cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 11 results. Next

A000215 Fermat numbers: a(n) = 2^(2^n) + 1.

Original entry on oeis.org

3, 5, 17, 257, 65537, 4294967297, 18446744073709551617, 340282366920938463463374607431768211457, 115792089237316195423570985008687907853269984665640564039457584007913129639937
Offset: 0

Views

Author

Keywords

Comments

It is conjectured that just the first 5 numbers in this sequence are primes.
An infinite coprime sequence defined by recursion. - Michael Somos, Mar 14 2004
For n>0, Fermat numbers F(n) have digital roots 5 or 8 depending on whether n is even or odd (Koshy). - Lekraj Beedassy, Mar 17 2005
This is the special case k=2 of sequences with exact mutual k-residues. In general, a(1)=k+1 and a(n)=min{m | m>a(n-1), mod(m,a(i))=k, i=1,...,n-1}. k=1 gives Sylvester's sequence A000058. - Seppo Mustonen, Sep 04 2005
For n>1 final two digits of a(n) are periodically repeated with period 4: {17, 57, 37, 97}. - Alexander Adamchuk, Apr 07 2007
For 1 < k <= 2^n, a(A007814(k-1)) divides a(n) + 2^k. More generally, for any number k, let r = k mod 2^n and suppose r != 1, then a(A007814(r-1)) divides a(n) + 2^k. - T. D. Noe, Jul 12 2007
From Daniel Forgues, Jun 20 2011: (Start)
The Fermat numbers F_n are F_n(a,b) = a^(2^n) + b^(2^n) with a = 2 and b = 1.
For n >= 2, all factors of F_n = 2^(2^n) + 1 are of the form k*(2^(n+2)) + 1 (k >= 1).
The products of distinct Fermat numbers (in their binary representation, see A080176) give rows of Sierpiński's triangle (A006943). (End)
Let F(n) be a Fermat number. For n > 2, F(n) is prime if and only if 5^((F(n)-1)/4) == sqrt(F(n)-1) (mod F(n)). - Arkadiusz Wesolowski, Jul 16 2011
Conjecture: let the smallest prime factor of Fermat number F(n) be P(F(n)). If F(n) is composite, then P(F(n)) < 3*2^(2^n/2 - n - 2). - Arkadiusz Wesolowski, Aug 10 2012
The Fermat primes are not Brazilian numbers, so they belong to A220627, but the Fermat composites are Brazilian numbers so they belong to A220571. For a proof, see Proposition 3 page 36 on "Les nombres brésiliens" in Links. - Bernard Schott, Dec 29 2012
It appears that this sequence is generated by starting with a(0)=3 and following the rule "Write in binary and read in base 4". For an example of "Write in binary and read in ternary", see A014118. - John W. Layman, Jul 30 2013
Conjecture: the numbers > 5 in this sequence, i.e., 2^2^k + 1 for k>1, are exactly the numbers n such that (n-1)^4-1 divides 2^(n-1)-1. - M. F. Hasler, Jul 24 2015

Examples

			a(0) = 1*2^1 + 1 = 3 = 1*(2*1) + 1.
a(1) = 1*2^2 + 1 = 5 = 1*(2*2) + 1.
a(2) = 1*2^4 + 1 = 17 = 2*(2*4) + 1.
a(3) = 1*2^8 + 1 = 257 = 16*(2*8) + 1.
a(4) = 1*2^16 + 1 = 65537 = 2048*(2*16) + 1.
a(5) = 1*2^32 + 1 = 4294967297 = 641*6700417 = (10*(2*32) + 1)*(104694*(2*32) + 1).
a(6) = 1*2^64 + 1 = 18446744073709551617 = 274177*67280421310721 = (2142*(2*64) + 1)*(525628291490*(2*64) + 1).
		

References

  • M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 2nd. ed., 2001; see p. 3.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 7.
  • P. Bachmann, Niedere Zahlentheorie (1902, 1910), reprinted Chelsea, NY, 1968, vol. 2, p. 87.
  • James Gleick, Faster, Vintage Books, NY, 2000 (see pp. 259-261).
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, pp. 78-79.
  • R. K. Guy, Unsolved Problems in Number Theory, A3.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 14.
  • E. Hille, Analytic Function Theory, Vol. I, Chelsea, N.Y., see p. 64.
  • T. Koshy, "The Digital Root Of A Fermat Number", Journal of Recreational Mathematics Vol. 32 No. 2 2002-3 Baywood NY.
  • M. Krizek, F. Luca & L. Somer, 17 Lectures on Fermat Numbers, Springer-Verlag NY 2001.
  • C. S. Ogilvy and J. T. Anderson, Excursions in Number Theory, Oxford University Press, NY, 1966, p. 36.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see pp. 18, 59.
  • C. A. Pickover, The Math Book, Sterling, NY, 2009; see p. 202.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 6-7, 70-75.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 136-137.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, 1987, pp. 148-149.

Crossrefs

a(n) = A001146(n) + 1 = A051179(n) + 2.
See A004249 for a similar sequence.
Cf. A080176 for binary representation of Fermat numbers.

Programs

  • Haskell
    a000215 = (+ 1) . (2 ^) . (2 ^)  -- Reinhard Zumkeller, Feb 13 2015
    
  • Maple
    A000215 := n->2^(2^n)+1;
  • Mathematica
    Table[2^(2^n) + 1, {n, 0, 8}] (* Alonso del Arte, Jun 07 2011 *)
  • Maxima
    A000215(n):=2^(2^n)+1$ makelist(A000215(n),n,0,10); /* Martin Ettl, Dec 10 2012 */
    
  • PARI
    a(n)=if(n<1,3*(n==0),(a(n-1)-1)^2+1)
    
  • Python
    def a(n): return 2**(2**n) + 1
    print([a(n) for n in range(9)]) # Michael S. Branicky, Apr 19 2021

Formula

a(0) = 3; a(n) = (a(n-1)-1)^2 + 1, n >= 1.
a(n) = a(n-1)*a(n-2)*...*a(1)*a(0) + 2, n >= 0, where for n = 0, we get the empty product, i.e., 1, plus 2, giving 3 = a(0). - Benoit Cloitre, Sep 15 2002 [edited by Daniel Forgues, Jun 20 2011]
The above formula implies that the Fermat numbers (being all odd) are coprime.
Conjecture: F is a Fermat prime if and only if phi(F-2) = (F-1)/2. - Benoit Cloitre, Sep 15 2002
A000120(a(n)) = 2. - Reinhard Zumkeller, Aug 07 2010
If a(n) is composite, then a(n) = A242619(n)^2 + A242620(n)^2 = A257916(n)^2 - A257917(n)^2. - Arkadiusz Wesolowski, May 13 2015
Sum_{n>=0} 1/a(n) = A051158. - Amiram Eldar, Oct 27 2020
From Amiram Eldar, Jan 28 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = A249119.
Product_{n>=0} (1 - 1/a(n)) = 1/2. (End)
a(n) = 2*A077585(n) + 3. - César Aguilera, Jul 26 2023
a(n) = 2*2^A000225(n) + 1. - César Aguilera, Jul 11 2024

A023001 a(n) = (8^n - 1)/7.

Original entry on oeis.org

0, 1, 9, 73, 585, 4681, 37449, 299593, 2396745, 19173961, 153391689, 1227133513, 9817068105, 78536544841, 628292358729, 5026338869833, 40210710958665, 321685687669321, 2573485501354569, 20587884010836553, 164703072086692425
Offset: 0

Views

Author

Keywords

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)

Examples

			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
		

Crossrefs

Programs

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

A190300 Composite numbers that are not Brazilian.

Original entry on oeis.org

4, 6, 9, 25, 49, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2809, 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12769, 16129, 17161, 18769, 19321, 22201, 22801, 24649, 26569, 27889, 29929, 32041, 32761, 36481, 37249, 38809, 39601, 44521, 49729
Offset: 1

Views

Author

N. J. A. Sloane, May 14 2011

Keywords

Comments

Other than the term 6 and the missing term 121, is this sequence the same as A001248? - Nathaniel Johnston, May 24 2011
From Bernard Schott, Dec 04 2012: (Start)
Yes, because
1) 4 is not a Brazilian number [4 = 100_2].
2) 6 is not a Brazilian number [6 = 110_2 = 20_3 = 12_4].
3) Theorem 1, page 32 of Quadrature article mentioned in links: If n > 7 is not Brazilian, then n is a prime or the square of a prime.
4) Theorem 5, page 37 of Quadrature article mentioned in links: The only square of prime number which is Brazilian is 121 = 11^2 = 11111_3.
(End)
There is an infinity of composite numbers that are not Brazilian: Corollary 2, page 37 of Quadrature article in links (consider the sequence of squares of prime numbers for p >= 13). - Bernard Schott, Dec 17 2012
Also semiprimes that are not Brazilian. - Bernard Schott, Apr 11 2019

Examples

			a(10) = p_10^2 = 29^2 = 841.
		

Crossrefs

Intersection of A002808 and A220570.
Intersection of A001358 and A220570.

Programs

  • Maple
    4, 6, 9, 25, 49,seq(ithprime(i)^2, i=6..100); # Robert Israel, Apr 17 2019
  • Mathematica
    brazBases[n_] := Select[Range[2, n - 2], Length[Union[IntegerDigits[n, #]]] == 1 &]; Select[Range[2, 10000], ! PrimeQ[#] && brazBases[#] == {} &] (* T. D. Noe, Dec 26 2012 *)
    f[n_] := Block[{b = 2}, While[ Length@ Union@ IntegerDigits[n, b] != 1, b++]; b]; k = 4; lst = {}; While[k < 50001, If[ !PrimeQ@ k && 1 + f@ k == k, AppendTo[lst, k]]; k++]; lst (* Robert G. Wilson v, Mar 30 2014 *)
  • PARI
    isnotb(n) = my(c=0, d); for(b=2, n-2, d=digits(n, b); if(vecmin(d)==vecmax(d), c=n; break); c++); (c==max(n-3, 0)); \\ A220570
    lista(nn) = forcomposite(n=1, nn, if (isnotb(n), print1(n, ", "))); \\ Michel Marcus, Apr 14 2019

Formula

a(1) = 2^2 = p_1^2, a(2) = 2*3 = p_1*p_2, a(3) = 3^2 = p_2^2, a(4) = 5^2 = p_3^2, a(5) = 7^2 = p_4^2, a(6) = 13^2 = p_6^2, ..., for n >= 6, a(n) = p_n^2, where p_k is the k-th prime number. - Bernard Schott, Dec 04 2012

Extensions

a(6)-a(24) from Nathaniel Johnston, May 24 2011
a(25) onward from Robert G. Wilson v, Mar 30 2014

A208242 Perfect powers y^q with y > 1 and q > 1 which are Brazilian repunits with three or more digits in some base.

Original entry on oeis.org

121, 343, 400
Offset: 1

Views

Author

Bernard Schott, Jan 11 2013

Keywords

Comments

These three numbers are the only known solutions y^q of the Nagell-Ljunggren equation (b^m-1)/(b-1) = y^q with y > 1, q > 1, b > 1, m > 2. Yann Bugeaud and Maurice Mignotte propose two alternative conjectures:
A) The Nagell-Ljunggren equation has only these three solutions.
Considering the current state of our knowledge, this conjecture seems too ambitious, while the next one seems more reasonable.
B) The Nagell-Ljunggren equation has only a finite number of solutions.
This last conjecture is true if the abc conjecture is true (see article Bugeaud-Mignotte in link, p. 148).
Consequence: 121 is the only known square of prime which is Brazilian.
There are no other solutions for some base b < 10000.
Some theorems and results about this equation:
With the exception of the 3 known solutions,
1) for q = 2, there are no other solutions than 11^2 and 20^2,
2) there is no other solution if 3 divides m than 7^3,
3) there is no other solution if 4 divides m than 20^2. - Bernard Schott, Apr 29 2019
From David A. Corneth, Apr 29 2019: (Start)
Intersection of A001597 and A053696.
a(4) > 10^25 if it exists using constraints above.
In the Nagell-Ljunggren equation, we need b > 2. If b = 2, we get y^q = 2^m - 1 which by Catalan's conjecture has no solutions (see A001597). (End)

Examples

			121 = 11^2 =  (3^5 - 1)/ (3 - 1) = 11111_3.
343 =  7^3 = (18^3 - 1)/(18 - 1) =   111_18.
400 = 20^2 =  (7^4 - 1)/ (7 - 1) =  1111_7.
		

Crossrefs

Cf. A001597, A053696, A220571 (Brazilian composites), A307745 (similar but with digits > 1).

Programs

  • PARI
    is(n) = if(!ispower(n), return(0)); for(b=2, n-1, my(d=digits(n, b)); if(#d > 2 && vecmin(d)==1 && vecmax(d)==1, return(1))); 0 \\ Felix Fröhlich, Apr 29 2019

Extensions

Small edits to the name by Bernard Schott, Apr 30 2019

A288783 Brazilian numbers which have only one Brazilian representation.

Original entry on oeis.org

7, 8, 10, 12, 13, 14, 16, 20, 22, 27, 33, 34, 35, 38, 39, 43, 46, 51, 55, 58, 65, 69, 73, 74, 77, 81, 82, 87, 94, 95, 106, 115, 118, 119, 121, 122, 123, 125, 127, 134, 141, 142, 143, 145
Offset: 1

Views

Author

Bernard Schott, Jun 15 2017

Keywords

Comments

These numbers could be called 1-Brazilian numbers.
The smallest number of this sequence is 7 = 111_2 which is also the smallest Brazilian number (A125134) and the smallest Brazilian prime (A085104), and as such belongs to A329383.
a(2) = 8 is the smallest composite Brazilian number and so the smallest even composite Brazilian with 8 = 22_3 (A220571).
a(10) = 27 is the smallest odd composite Brazilian in this sequence because 27 = 33_8 but 15 is the smallest odd composite Brazilian with 15 = 1111_2 = 33_4 so with two representations.
121 is the only square of prime which is Brazilian with 121 = 11111_3.
In this sequence, there are:
1) The Brazilian primes (except for 31 and 8191) and the only square of prime 121 which are all repunits in a base >= 2 with a string of at least three 1's.
2) The composite numbers which are such that n = a * b = (aa)_(b-1) with 1 < a < b-1 with only one such product a * b.

Examples

			13 = 111_3; 127 = 1111111_2.
20 = 2 * 10 = 22_9; 55 = 5 * 11 = 55_10; 69 = 3 * 23 = 33_22.
31 = 11111_2 = 111_5 so 31 is not a term.
		

References

  • D. Lignon, Dictionnaire de (presque) tous les nombres entiers, Ellipses, 2012, page 420.

Crossrefs

Programs

  • Mathematica
    Select[Range@ 145, Function[n, Count[Range[2, n - 2], b_ /; SameQ @@ IntegerDigits[n, b]] == 1]] (* Michael De Vlieger, Jun 16 2017 *)

A290017 Brazilian numbers which have exactly four Brazilian representations.

Original entry on oeis.org

40, 48, 63, 72, 90, 112, 114, 132, 162, 170, 176, 208, 222, 266, 285, 304, 306, 366, 368, 380, 399, 405, 438, 455, 464, 496, 512, 518, 555, 567, 592, 650, 651, 656, 665, 682, 686, 688, 752, 762, 812, 848, 891, 915, 931, 942, 944, 976, 992, 999, 1024, 1029, 1053, 1072, 1106, 1136, 1168
Offset: 1

Views

Author

Bernard Schott, Jul 28 2017

Keywords

Comments

These numbers could be called 4-Brazilian numbers.
All these numbers are composite with six to twelve divisors.
The smallest number of this sequence is 40 with 40 = 1111_3 = 55_7 = 44_9 = 22_19. The number 40 is a highly Brazilian number in A329383.

Examples

			48 = 6 * 8 = 66_7 = 4 * 12 = 44_11 = 3 * 16 = 33_15 = 2 * 24 = 22_23.
63 = 111111_2 = 3 * 21 = 33_20 = 333_4 = 7 * 9 = 77_8.
		

Crossrefs

Programs

A290015 Brazilian numbers which have exactly two Brazilian representations.

Original entry on oeis.org

15, 18, 21, 26, 28, 30, 31, 32, 44, 45, 50, 52, 56, 57, 62, 64, 68, 75, 76, 85, 86, 91, 92, 93, 98, 99, 110, 111, 116, 117, 129, 133, 146, 147, 148, 153, 164, 175, 183, 188, 207, 212, 215, 219, 236, 243, 244, 245, 259, 261, 268, 275, 279, 284, 314, 316, 325, 332, 338, 341, 343, 356, 363, 365, 369, 381, 387, 388
Offset: 1

Views

Author

Bernard Schott, Jul 17 2017

Keywords

Comments

These numbers could be called 2-Brazilian numbers.
The smallest number of this sequence is 15 which is also the smallest odd composite Brazilian in A257521 with 15 = 11111_2 = 33_4. The number 15 is highly Brazilian in A329383.
Following the Goormaghtigh conjecture, only two primes, 31 and 8191, which are both Mersenne numbers, are Brazilian in two different bases (A119598).

Examples

			18 = 2 * 9 = 22_8 = 3 * 6 = 33_5.
26 = 2 * 13 = 2 * 111_3 = 222_3 = 22_12.
31 = 11111_2 = 111_5;
8191 = 1111111111111_2 = 111_90.
		

Crossrefs

Programs

  • Maple
    bresilienbaseb:=proc(n,b)
    local r,q,coupleq:
    if n0 then
    return [couple[1]+1,r]
    else
    return [0,0]
    end if
    end if
    end proc;
    bresil:=proc(n)
    local b,L,k,t:
    k:=0:
    for b from 2 to (n-2) do
    t:=bresilienbase(n,b):
    if t[1]>0 then
    k:=k+1
    L[k]:=[b,t[1],t[2]]:
    end if:
    end do:
    seq(L[i],i=1..k);
    end proc;
    nbbresil:=n->nops([bresil(n)]);
    #Numbers 2 times Brazilian
    for n from 1 to 100 do if nbbresil(n)=2 then print(n,bresil(n)) else fi; od:
  • Mathematica
    Flatten@ Position[#, 2] &@ Table[Count[Range[2, n - 2], ?(And[Length@ # != 1, Length@ Union@ # == 1] &@ IntegerDigits[n, #] &)], {n, 400}] (* _Michael De Vlieger, Jul 18 2017 *)

A290016 Brazilian numbers which have exactly three Brazilian representations.

Original entry on oeis.org

24, 36, 42, 54, 66, 70, 78, 88, 100, 102, 104, 105, 124, 128, 130, 135, 136, 138, 152, 154, 165, 171, 172, 174, 182, 184, 186, 189, 190, 195, 196, 225, 230, 231, 232, 238, 242, 246, 248, 250, 256, 258, 272, 282, 286, 290, 292, 296, 297, 310, 318, 322, 328, 333, 344, 345
Offset: 1

Author

Bernard Schott, Jul 27 2017

Keywords

Comments

These numbers could be called 3-Brazilian numbers.
All these numbers are composite with six to ten different divisors.
The smallest number of this sequence is 24 with 24 = 44_5 = 33_7 = 22_11. The number 24 is highly Brazilian in A329383.

Examples

			36 = 4 * 9 = 44_8 = 3 * 12 = 33_11 = 2 * 18 = 22_19.
42 = 2 * 21 = 22_20 = 222_4 = 3 * 14 = 33_13.
124 = 4 * 31 = 44_30 = 444_5 = 2 * 62 = 22_61.
272 = 8 * 34 = 88_33 = 4 * 68 = 44_67 = 2 * 136 = 22_135.
		

Programs

A258165 Odd non-Brazilian numbers > 1.

Original entry on oeis.org

3, 5, 9, 11, 17, 19, 23, 25, 29, 37, 41, 47, 49, 53, 59, 61, 67, 71, 79, 83, 89, 97, 101, 103, 107, 109, 113, 131, 137, 139, 149, 151, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 223, 227, 229, 233, 239, 251, 257, 263, 269, 271, 277, 281, 283, 289, 293, 311, 313, 317, 331, 337
Offset: 1

Author

Keywords

Comments

Complement of A257521 in A144396 (odd numbers > 1).
The terms are only odd primes or squares of odd primes.
Most odd primes are present except those in A085104.
All terms which are not primes are squares of odd primes except 121 = 11^2.

Examples

			11 is present because there is no base b < 11 - 1 = 10 such that the representation of 11 in base b is a repdigit (all digits are equal). In fact, we have: 11 = 1011_2 = 102_3 = 23_4 = 21_5 = 15_6 = 14_7 = 13_8 = 12_9, and none of these representations are repdigits. - _Bernard Schott_, Jun 21 2017
		

Programs

  • Mathematica
    fQ[n_] := Block[{b = 2}, While[b < n - 1 && Length@ Union@ IntegerDigits[n, b] > 1, b++]; b+1 == n]; Select[1 + 2 Range@ 170, fQ]
  • PARI
    forstep(n=3, 300, 2, c=1; for(b=2, n-2, d=digits(n, b); if(vecmin(d)==vecmax(d), c=0;  break));if(c,print1(n,", "))) \\ Derek Orr, May 27 2015
    
  • Python
    from sympy.ntheory.factor_ import digits
    l=[]
    for n in range(3, 301, 2):
        c=1
        for b in range(2, n - 1):
            d=digits(n, b)[1:]
            if max(d)==min(d):
                c=0
                break
        if c: l.append(n)
    print(l) # Indranil Ghosh, Jun 22 2017, after PARI program

A325658 Brazilian composites of the form 1 + b + b^2 + b^3 + ... + b^k, b > 1, k > 1.

Original entry on oeis.org

15, 21, 40, 57, 63, 85, 91, 111, 121, 133, 156, 183, 255, 259, 273, 341, 343, 364, 381, 400, 507, 511, 553, 585, 651, 703, 781, 813, 820, 871, 931, 993, 1023, 1057, 1111, 1191, 1261, 1333, 1365, 1407, 1464, 1555, 1561, 1641, 1807, 1885, 1893, 1981, 2047, 2071, 2163, 2257, 2353
Offset: 1

Author

Bernard Schott, May 12 2019

Keywords

Comments

Composites that are repunits in base b >= 2 with three or more digits. If the Goormaghtigh conjecture is true, there are no composite numbers which can be represented as a string of three or more 1's in a base >= 2 in more than one way (A119598).
Only three known perfect powers belong to this sequence: 121, 343 and 400 (A208242).
Except for 121, each term of this sequence have also at least one Brazilian representation with only 2 digits.

Examples

			121 = (11111)_3, 133 = (111)_11 = (77)_18.
		

Crossrefs

Complement of A085104 with respect to A053696.
Intersection of A053696 and A220571.

Programs

  • Maple
    N:= 3000:
    Res:= NULL:
    for m from 2 while 1+m+m^2 <= N do
      for k from 2 do
        v:= (m^(k+1)-1)/(m-1);
        if v > N then break fi;
        if not isprime(v) then  Res:= Res, v fi
    od od:
    sort(convert({Res},list)); # Robert Israel, May 13 2019
  • PARI
    lista(nn) = {forcomposite(n=1, nn, for(b=2, sqrtint(n), my(d=digits(n, b), sd=Set(d)); if ((#d >= 3) && (#sd == 1) && (sd[1] == 1), print1(n, ", "); break);););} \\ Michel Marcus, May 18 2019
Showing 1-10 of 11 results. Next