login
Search: a285017 -id:a285017
     Sort: relevance | references | number | modified | created      Format: long | short | data
Primes of the form (10^k - 1)/9. Also called repunit primes or repdigit primes.
(Formerly M4816)
+0
117
11, 1111111111111111111, 11111111111111111111111
OFFSET
1,1
COMMENTS
The next term corresponds to k = 317 and is too large to include: see A004023.
Also called repunit primes or prime repunits.
Also, primes with digital product = 1.
The number of 1's in these repunits must also be prime. Since the number of 1's in (10^k-1)/9 is k, if k = p*m then (10^(p*m)-1) = (10^p)^m-1 => (10^p-1)/9 = q and q divides (10^k-1). This follows from the identity a^k - b^k = (a-b)*(a^(k-1) + a^(k-2)*b + ... + b^(k-1)). - Cino Hilliard, Dec 23 2008
A subset of A020449, ..., A020457, A036953, ..., cf. link to OEIS index. - M. F. Hasler, Jul 27 2015
The terms in this sequence, except 11 which is not Brazilian, are prime repunits in base ten, so they are Brazilian primes belonging to A085104 and A285017. - Bernard Schott, Apr 08 2017
REFERENCES
T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, p. 11. Graham, Knuth and Patashnik, Concrete mathematics, Addison-Wesley, 1994; see p. 146, problem 22.
M. Barsanti, R. Dvornicich, M. Forti, T. Franzoni, M. Gobbino, S. Mortola, L. Pernazza and R. Romito, Il Fibonacci N. 8 (included in Il Fibonacci, Unione Matematica Italiana, 2011), 2004, Problem 8.10.
Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 60.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
J. Brillhart et al., Factorizations of b^n +- 1, Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 3rd edition, 2002.
Ernest G. Hibbs, Component Interactions of the Prime Numbers, Ph. D. Thesis, Capitol Technology Univ. (2022), see p. 33.
Dmytro S. Inosov and Emil Vlasák, Cryptarithmically unique terms in integer sequences, arXiv:2410.21427 [math.NT], 2024. See p. 18.
D. H. Lehmer, On the number (10^23-1)/9, Bull. Amer. Math. Soc. 35 (1929), 349-350.
James Maynard and Brady Haran, Primes without a 7, Numberphile video (2019)
S. S. Wagstaff, Jr., The Cunningham Project
FORMULA
a(n) = A002275(A004023(n)).
MATHEMATICA
lst={}; Do[If[PrimeQ[p = (10^n - 1)/9], AppendTo[lst, p]], {n, 10^2}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 22 2008 *)
Select[Table[(10^n - 1) / 9, {n, 500}], PrimeQ] (* Vincenzo Librandi, Nov 08 2014 *)
Select[Table[FromDigits[PadRight[{}, n, 1]], {n, 30}], PrimeQ] (* Harvey P. Dale, Apr 07 2018 *)
PROG
(PARI) forprime(x=2, 20000, if(ispseudoprime((10^x-1)/9), print1((10^x-1)/9", "))) \\ Cino Hilliard, Dec 23 2008
(Magma) [a: n in [0..300] | IsPrime(a) where a is (10^n - 1) div 9 ]; // Vincenzo Librandi, Nov 08 2014
(Python)
from sympy import isprime
from itertools import count, islice
def agen(): # generator of terms
yield from (t for t in (int("1"*k) for k in count(1)) if isprime(t))
print(list(islice(agen(), 4))) # Michael S. Branicky, Jun 09 2022
CROSSREFS
A116692 is another version of repunit primes or repdigit primes. - N. J. A. Sloane, Jan 22 2023
See A004023 for the number of 1's.
Cf. A046413.
KEYWORD
nonn,nice,bref
EXTENSIONS
Edited by Max Alekseyev, Nov 15 2010
Name expanded by N. J. A. Sloane, Jan 22 2023
STATUS
approved
a(n) = (8^n - 1)/7.
+0
82
0, 1, 9, 73, 585, 4681, 37449, 299593, 2396745, 19173961, 153391689, 1227133513, 9817068105, 78536544841, 628292358729, 5026338869833, 40210710958665, 321685687669321, 2573485501354569, 20587884010836553, 164703072086692425
OFFSET
0,3
COMMENTS
Gives the (zero-based) positions of odd terms in A007556 (numbers n such that A007556(a(n)) mod 2 = 1). - Farideh Firoozbakht, Jun 13 2003
{1, 9, 73, 585, 4681, ...} is the binomial transform of A003950. - Philippe Deléham, Jul 22 2005
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=8, (i>1), A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n >= 1, a(n) = det(A). - Milan Janjic, Feb 21 2010
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=9, (i>1), A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n >= 1, a(n-1) = (-1)^n*charpoly(A,1). - Milan Janjic, Feb 21 2010
This is the sequence A(0,1;7,8;2) = A(0,1;8,0;1) of the family of sequences [a,b:c,d:k] considered by G. Detlefs, and treated as A(a,b;c,d;k) in the W. Lang link given below. - Wolfdieter Lang, Oct 18 2010
a(n) is the total number of squares the carpetmaker has removed after the n-th step of a Sierpiński carpet production. - Ivan N. Ianakiev, Oct 22 2013
For n >= 1, a(n) is the total number of holes in a box fractal (start with 8 boxes, 1 hole) after n iterations. See illustration in link. - Kival Ngaokrajang, Jan 27 2015
From Bernard Schott, May 01 2017: (Start)
Except for 0, 1 and 73, all the terms are composite because a(n) = ((2^n - 1) * (4^n + 2^n + 1))/7.
For n >= 3, all terms are Brazilian repunits numbers in base 8, and so belong to A125134.
a(3) = 73 is the only Brazilian prime in base 8, and so it belongs to A085104 and A285017. (End)
LINKS
A. Abdurrahman, CM Method and Expansion of Numbers, arXiv:1909.10889 [math.NT], 2019.
Carlos M. da Fonseca and Anthony G. Shannon, A formal operator involving Fermatian numbers, Notes Num. Theor. Disc. Math. (2024) Vol. 30, No. 3, 491-498.
Roger B. Eggleton, Maximal Midpoint-Free Subsets of Integers, International Journal of Combinatorics Volume 2015, Article ID 216475, 14 pages.
Quynh Nguyen, Jean Pedersen, and Hien T. Vu, New Integer Sequences Arising From 3-Period Folding Numbers, Vol. 19 (2016), Article 16.3.1. See Table 1.
Kalika Prasad, Munesh Kumari, Rabiranjan Mohanta, and Hrishikesh Mahato, The sequence of higher order Mersenne numbers and associated binomial transforms, arXiv:2307.08073 [math.NT], 2023.
Eric Weisstein's World of Mathematics, Repunit.
FORMULA
Also sum of cubes of divisors of 2^(n-1): a(n) = A001158(A000079(n-1)). - Labos Elemer, Apr 10 2003 and Farideh Firoozbakht, Jun 13 2003
a(n) = A033138(3n-2). - Alexandre Wajnberg, May 31 2005
From Philippe Deléham, Oct 12 2006: (Start)
a(0) = 0, a(n) = 8*a(n-1) + 1 for n>0.
G.f.: x/((1-8x)*(1-x)). (End)
From Wolfdieter Lang, Oct 18 2010: (Start)
a(n) = 7*a(n-1) + 8*a(n-2) + 2, a(0)=0, a(1)=1.
a(n) = 8*a(n-1) + a(n-2) - 8*a(n-3) = 9*a(n-1) - 8*a(n-2), a(0)=0, a(1)=1, a(2)=9. Observation by Gary Detlefs. See the W. Lang comment and link. (End)
a(n) = Sum_{k=0..n-1} 8^k. - Doug Bell, May 26 2017
E.g.f.: exp(x)*(exp(7*x) - 1)/7. - Stefano Spezia, Mar 11 2023
EXAMPLE
From Zerinvary Lajos, Jan 14 2007: (Start)
Octal.............decimal
0....................0
1....................1
11...................9
111.................73
1111...............585
11111.............4681
111111...........37449
1111111.........299593
11111111.......2396745
111111111.....19173961
1111111111...153391689
etc. ...............etc. (End)
a(4) = (8^4 - 1)/7 = 585 = 1111_8 = (2^4 - 1) * (4^4 + 2^4 + 1)/7 = 15 * 273/7 = 15 * 39. - Bernard Schott, May 01 2017
MAPLE
a:=n->sum(8^(n-j), j=1..n): seq(a(n), n=0..20); # Zerinvary Lajos, Jan 04 2007
MATHEMATICA
Table[(8^n-1)/7, {n, 0, m}]
LinearRecurrence[{9, -8}, {0, 1}, 30] (* Harvey P. Dale, Feb 12 2015 *)
PROG
(Sage) [lucas_number1(n, 9, 8) for n in range(0, 21)] # Zerinvary Lajos, Apr 23 2009
(Sage) [gaussian_binomial(n, 1, 8) for n in range(0, 21)] # Zerinvary Lajos, May 28 2009
(Magma) [(8^n-1)/7: n in [0..20]]; // Vincenzo Librandi, Sep 17 2011
(Maxima) A023001(n):=floor((8^n-1)/7)$
makelist(A023001(n), n, 0, 30); /* Martin Ettl, Nov 05 2012 */
(PARI) a(n)=(8^n-1)/7 \\ Charles R Greathouse IV, Mar 22 2016
(GAP)
A023001:=List([0..10^2], n->(8^n-1)/7); # Muniru A Asiru, Oct 03 2017
KEYWORD
easy,nonn
STATUS
approved
Primes of the form 1 + n + n^2 + n^3 + ... + n^k, n > 1, k > 1.
+0
66
7, 13, 31, 43, 73, 127, 157, 211, 241, 307, 421, 463, 601, 757, 1093, 1123, 1483, 1723, 2551, 2801, 2971, 3307, 3541, 3907, 4423, 4831, 5113, 5701, 6007, 6163, 6481, 8011, 8191, 9901, 10303, 11131, 12211, 12433, 13807, 14281, 17293, 19183, 19531, 20023
OFFSET
1,1
COMMENTS
Primes that are base-b repunits with three or more digits for at least one b >= 2: Primes in A053696. Subsequence of A000668 U A076481 U A086122 U A165210 U A102170 U A004022 U ... (for each possible b). - Rick L. Shepherd, Sep 07 2009
From Bernard Schott, Dec 18 2012: (Start)
Also known as Brazilian primes. The primes that are not Brazilian primes are in A220627.
The number of terms k+1 is always an odd prime, but this is not enough to guarantee a prime, for example 111 = 1 + 10 + 100 = 3*37.
The inverses of the Brazilian primes form a convergent series; the sum is slightly larger than 0.33 (see Theorem 4 of Quadrature article in the Links). (End)
It is not known whether there are infinitely many Brazilian primes. See A002383. - Bernard Schott, Jan 11 2013
Primes of the form (n^p - 1)/(n - 1), where p is odd prime and n > 1. - Thomas Ordowski, Apr 25 2013
Number of terms less than 10^n: 1, 5, 14, 34, 83, 205, 542, 1445, 3880, 10831, 30699, 88285, ..., . - Robert G. Wilson v, Mar 31 2014
From Bernard Schott, Apr 08 2017: (Start)
Brazilian primes fall into two classes:
1) when n is prime, we get sequence A023195 except 3 which is not Brazilian,
2) when n is composite, we get sequence A285017. (End)
The conjecture proposed in Quadrature "No Sophie Germain prime is Brazilian (prime)" (see link Bernard Schott, Quadrature, Conjecture 1, page 36) is false. Thanks to Giovanni Resta, who found that a(856) = 28792661 = 1 + 73 + 73^2 + 73^3 + 73^4 = (11111)_73 is the 141385th Sophie Germain prime. - Bernard Schott, Mar 08 2019
REFERENCES
Daniel Lignon, Dictionnaire de (presque) tous les nombres entiers, Ellipses, Paris, 2012, page 174.
LINKS
Jon E. Schoenfield, Table of n, a(n) for n = 1..10831 (terms up to 10^10; terms 1..3880 from T. D. Noe)
Bernard Schott, Les nombres brésiliens, Quadrature, no. 76, avril-juin 2010, pages 30-38; included here with permission from the editors of Quadrature.
FORMULA
A010051(a(n)) * A088323(a(n)) > 1. - Reinhard Zumkeller, Jan 22 2014
EXAMPLE
13 is a term since it is prime and 13 = 1 + 3 + 3^2 = 111_3.
31 is a term since it is prime and 31 = 1 + 2 + 2^2 + 2^3 + 2^4 = 11111_2.
From Hartmut F. W. Hoft, May 08 2017: (Start)
The sequence represented as a sparse matrix with the k-th column indexed by A006093(k+1), primes minus 1, and row n by A000027(n+1). Traversing the matrix by counterdiagonals produces a non-monotone ordering.
2 4 6 10 12 16
2 7 31 127 - 8191 131071
3 13 - 1093 - 797161 -
4 - - - - - -
5 31 - 19531 12207031 305175781 -
6 43 - 55987 - - -
7 - 2801 - - 16148168401 -
8 73 - - - - -
9 - - - - - -
10 - - - - - -
11 - - - - - 50544702849929377
12 157 22621 - - - -
13 - 30941 5229043 - - -
14 211 - 8108731 - - -
15 241 - - - - -
16 - - - - - -
17 307 88741 25646167 2141993519227 - -
18 - - - - - -
19 - - - - - -
20 421 - - 10778947368421 - 689852631578947368421
21 463 - - 17513875027111 - 1502097124754084594737
22 - 245411 - - - -
23 - 292561 - - - -
24 601 346201 - - - -
Except for the initial values in the respective sequences the rows and columns as labeled in the matrix are:
column 2: A002383 row 2: A000668
column 4: A088548 row 3: A076481
column 6: A088550 row 4: -
column 10: A162861 row 5: A086122.
(End)
MATHEMATICA
max = 140; maxdata = (1 - max^3)/(1 - max); a = {}; Do[i = 1; While[i = i + 2; cc = (1 - m^i)/(1 - m); cc <= maxdata, If[PrimeQ[cc], a = Append[a, cc]]], {m, 2, max}]; Union[a] (* Lei Zhou, Feb 08 2012 *)
f[n_] := Block[{i = 1, d, p = Prime@ n}, d = Rest@ Divisors[p - 1]; While[ id = IntegerDigits[p, d[[i]]]; id != Reverse@ id || Union@ id != {1}, i++]; d[[i]]]; Select[ Range[2, 60], 1 + f@# != Prime@# &] (* Robert G. Wilson v, Mar 31 2014 *)
PROG
(PARI) list(lim)=my(v=List(), t, k); for(n=2, sqrt(lim), t=1+n; k=1; while((t+=n^k++)<=lim, if(isprime(t), listput(v, t)))); vecsort(Vec(v), , 8) \\ Charles R Greathouse IV, Jan 08 2013
(PARI) A085104_vec(N, L=List())=forprime(K=3, logint(N+1, 2), for(n=2, sqrtnint(N-1, K-1), isprime((n^K-1)\(n-1))&&listput(L, (n^K-1)\(n-1)))); Set(L) \\ M. F. Hasler, Jun 26 2018
(Haskell)
a085104 n = a085104_list !! (n-1)
a085104_list = filter ((> 1) . a088323) a000040_list
-- Reinhard Zumkeller, Jan 22 2014
CROSSREFS
Cf. A189891 (complement), A125134 (Brazilian numbers), A220627 (Primes that are non-Brazilian).
Cf. A003424 (n restricted to prime powers).
Equals A023195 \3 Union A285017 with empty intersection.
Primes of the form (b^k-1)/(b-1) for b=2: A000668, b=3: A076481, b=5: A086122, b=6: A165210, b=7: A102170, b=10: A004022.
Primes of the form (b^k-1)/(b-1) for k=3: A002383, k=5: A088548, k=7: A088550, k=11: A162861.
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jul 03 2003
EXTENSIONS
More terms from David Wasserman, Jan 26 2005
STATUS
approved
Nonprime numbers n such that n^4 + n^3 + n^2 + n + 1 is prime.
+0
3
1, 12, 22, 24, 28, 30, 40, 44, 50, 62, 63, 68, 74, 77, 85, 94, 99, 110, 117, 118, 120, 122, 129, 134, 143, 145, 154, 162, 164, 165, 172, 175
OFFSET
1,2
COMMENTS
A065509 Union {this sequence} = A049409.
The corresponding prime numbers n^4 + n^3 + n^2 + n + 1 = 11111_n are in A193366; these Brazilian primes, except 5 which is not Brazilian, belong to A085104 and A285017.
LINKS
Bernard Schott, Les nombres brésiliens, Quadrature, no. 76, avril-juin 2010, pages 30-38.
EXAMPLE
12 is in the sequence because 12^4 + 12^3 + 12^2 + 12 + 1 = 11111_12 = 22621, which is prime.
MATHEMATICA
Select[Range@ 414, And[! PrimeQ@ #, PrimeQ[Total[#^Range[0, 4]]]] &] (* Michael De Vlieger, May 03 2017 *)
PROG
(PARI) isok(n)=if(n==1, 5, if(ispseudoprime(n), 0, isprime(fromdigits([1, 1, 1, 1, 1], n))));
getfirstterms(n)={my(L:list, c:small); L=List(); c=0; forstep(k=1, +oo, 1, if(isok(k), listput(L, k); if(c++==n, break))); return(Vec(L))} \\ R. J. Cano, May 09 2017
KEYWORD
nonn
AUTHOR
Bernard Schott, May 02 2017
STATUS
approved
Nonprime numbers k such that k^6 + k^5 + k^4 + k^3 + k^2 + k + 1 is prime.
+0
2
1, 6, 14, 26, 38, 40, 46, 56, 60, 66, 68, 72, 80, 87, 93, 95, 115, 122, 126, 128, 146, 156, 158, 160, 180, 186, 192, 203, 206, 208, 220, 221, 235, 237, 238, 264, 266, 280, 282, 290, 294, 300, 303, 320, 341, 350, 363, 381, 395, 399, 404, 405, 417, 418, 436, 438, 447, 450
OFFSET
1,2
COMMENTS
A163268 Union {This sequence} = A100330.
The corresponding prime numbers k^6 + k^5 + k^4 + k^3 + k^2 + k + 1 = 1111111_k are in A194194; all these Brazilian primes belong to A085104 and A285017.
EXAMPLE
6 is in the sequence because 6^6 + 6^5 + 6^4 + 6^3 + 6^2 + 6 + 1 = 1111111_6 = 55987 which is prime.
MAPLE
for n from 1 to 200 do s(n):= 1+n+n^2+n^3+n^4+n^5+n^6;
if not isprime(n) and isprime(s(n)) then print(n, s(n)) else fi; od:
MATHEMATICA
Select[Range@ 450, And[! PrimeQ@ #, PrimeQ@ Total[#^Range[0, 6]]] &] (* Michael De Vlieger, Jun 19 2017 *)
PROG
(PARI) isok(n) = !isprime(n) && isprime(1+n+n^2+n^3+n^4+n^5+n^6); \\ Michel Marcus, Jun 19 2017
(Python)
from sympy import isprime
A288939_list = [n for n in range(10**3) if not isprime(n) and isprime(n*(n*(n*(n*(n*(n + 1) + 1) + 1) + 1) + 1) + 1)] # Chai Wah Wu, Jul 13 2017
KEYWORD
nonn
AUTHOR
Bernard Schott, Jun 19 2017
STATUS
approved
Nonprimes k such that k^10 + k^9 + k^8 + k^7 + k^6 + k^5 + k^4 + k^3 + k^2 + k + 1 is prime.
+0
1
1, 20, 21, 30, 60, 86, 172, 195, 212, 224, 258, 268, 272, 319, 339, 355, 365, 366, 390, 398, 414, 480, 504, 534, 539, 543, 567, 592, 626, 654, 735, 756, 766, 770, 778, 806, 812, 874, 943, 973, 1003, 1036, 1040, 1065, 1194, 1210, 1239, 1243, 1264, 1309, 1311
OFFSET
1,2
COMMENTS
A240693 Union {this sequence} = A162862.
The corresponding prime numbers, (11111111111)_k, are Brazilian primes and belong to A085104 and A285017 (except 11).
EXAMPLE
(11111111111)_20 = (20^11 - 1)/19 = 10778947368421 is prime, thus 20 is a term.
MAPLE
filter:= n -> not isprime(n) and isprime((n^11-1)/(n-1)) : select(filter, [$2..5000]);
MATHEMATICA
Select[Range@ 1320, And[! PrimeQ@ #, PrimeQ@ Total[#^Range[0, 10]]] &] (* Michael De Vlieger, Jun 09 2019 *)
PROG
(Magma) [1] cat [n:n in [2..1500]|not IsPrime(n) and IsPrime(Floor((n^11-1)/(n-1)))]; // Marius A. Burtea, May 16 2019
(PARI) isok(n) = !isprime(n) && isprime(polcyclo(11, n)); \\ Michel Marcus, May 19 2019
CROSSREFS
Intersection of A064108 and A285017.
Similar to A182253 for k^2+k+1, A286094 for k^4+k^3+k^2+k+1, A288939 for k^6+k^5+k^4+k^3+k^2+k+1.
KEYWORD
nonn
AUTHOR
Bernard Schott, May 16 2019
STATUS
approved

Search completed in 0.009 seconds