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.

Previous Showing 21-30 of 64 results. Next

A088550 Primes of the form n^6 + n^5 + n^4 + n^3 + n^2 + n + 1.

Original entry on oeis.org

7, 127, 1093, 19531, 55987, 5229043, 8108731, 25646167, 321272407, 917087137, 3092313043, 4201025641, 9684836827, 31401724537, 47446779661, 52379047267, 83925549247, 100343116693, 141276239497, 153436090543, 265462278481
Offset: 1

Views

Author

Cino Hilliard, Nov 17 2003

Keywords

Comments

These numbers, starting with 127, are repunit primes 1111111_n in a base n >= 2, so except 7, they are all Brazilian primes belonging to A085104. In fact, 7 = 111_2 is also Brazilian by this other way. (See Links "Les nombres brésiliens", § V.4 -§ V.5.) A088550 is generated by the bases n present in A100330. - Bernard Schott, Dec 20 2012

Examples

			a(3) = 1093 = 3^6 + 3^5 + 3^4 + 3^3 + 3^2 + 3 + 1 is prime.
		

Crossrefs

Programs

  • Magma
    [a: n in [0..100] | IsPrime(a) where a is 1+n+n^2+n^3+n^4+n^5+n^6] ; // Vincenzo Librandi, Jul 14 2012
  • Maple
    A088550 := proc(n)
        numtheory[cyclotomic](7,A100330(n)) ;
    end proc:
    seq(A088550(n),n=1..30) ;
  • Mathematica
    Select[Table[n^6 + n^5 + n^4 + n^3 + n^2 + n + 1, {n, 100}], PrimeQ] (* Alonso del Arte, Feb 07 2014 *)
    Select[Table[Total[n^Range[0,6]],{n,100}],PrimeQ] (* Harvey P. Dale, Aug 13 2024 *)
  • PARI
    polypn(n,p) = { for(x=1,n, if(p%2,y=2,y=1); for(m=1,p, y=y+x^m; ); if(isprime(y),print1(y",")); ) }
    

A220571 Composite numbers that are Brazilian.

Original entry on oeis.org

8, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100
Offset: 1

Views

Author

Bernard Schott, Dec 16 2012

Keywords

Comments

There are just two differences of members with A080257:
1) the term 6 is missing here because 6 is not a Brazilian number.
2) the new term 121 is present although 121 has only 3 divisors, because 121 = 11^2 = 11111_3 is a composite number which is Brazilian. 121 is the lone square of a prime which is Brazilian: Theorem 5, page 37 of Quadrature article in links.
There is an infinity of Brazilian composite numbers (Theorem 1, page 32 of Quadrature article in links: every even number >= 8 is a Brazilian number).

Crossrefs

Programs

  • Mathematica
    Select[Range[4, 10^2], And[CompositeQ@ #, Module[{b = 2, n = #}, While[And[b < n - 1, Length@ Union@ IntegerDigits[n, b] > 1], b++]; b < n - 1]] &] (* Michael De Vlieger, Jul 30 2017, after T. D. Noe at A125134 *)

A088790 Numbers k such that (k^k-1)/(k-1) is prime.

Original entry on oeis.org

2, 3, 19, 31, 7547
Offset: 1

Views

Author

T. D. Noe, Oct 16 2003

Keywords

Comments

Note that (k^k-1)/(k-1) is prime only if k is prime, in which case it equals cyclotomic(k,k), the k-th cyclotomic polynomial evaluated at x=k. This sequence is a subsequence of A070519. The number cyclotomic(7547,7547) is a probable prime found by H. Lifchitz. Are there only a finite number of these primes?
From T. D. Noe, Dec 16 2008: (Start)
The standard heuristic implies that there are an infinite number of these primes and that the next k should be between 10^10 and 10^11.
Let N = (7547^7547-1)/(7547-1) = A023037(7547). If N is prime, then the period of the Bell numbers modulo 7547 is N. See A054767. (End)

References

  • R. K. Guy, Unsolved Problems in Theory of Numbers, 1994, A3.

Crossrefs

Cf. A070519 (cyclotomic(n, n) is prime).
Cf. A056826 ((n^n+1)/(n+1) is prime).

Programs

  • Mathematica
    Do[p=Prime[n]; If[PrimeQ[(p^p-1)/(p-1)], Print[p]], {n, 100}]
  • PARI
    is(n)=ispseudoprime((n^n-1)/(n-1)) \\ Charles R Greathouse IV, Feb 17 2017

A003424 Primes of form (p^x - 1)/(p^y - 1), p prime.

Original entry on oeis.org

3, 5, 7, 13, 17, 31, 73, 127, 257, 307, 757, 1093, 1723, 2801, 3541, 5113, 8011, 8191, 10303, 17293, 19531, 28057, 30103, 30941, 65537, 86143, 88741, 131071, 147073
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A185632 Primes of the form n^2 + n + 1 where n is nonprime.

Original entry on oeis.org

3, 43, 73, 157, 211, 241, 421, 463, 601, 757, 1123, 1483, 2551, 2971, 3307, 3907, 4423, 4831, 5701, 6007, 6163, 6481, 8191, 9901, 11131, 12211, 12433, 13807, 14281, 19183, 20023, 20593, 21757, 22651, 23563, 24181, 26083, 26407, 27061, 28393, 31153, 35533
Offset: 1

Views

Author

Bernard Schott, Dec 18 2012

Keywords

Comments

These are the primes associated with A182253.
All these numbers are in A002383 but not in A053183.
All the numbers n^2 + n + 1 = 111_n with n >= 2 are by definition Brazilian numbers: A125134. See Links: "Les nombres brésiliens" - Section V.5 page 35.

Crossrefs

Programs

  • Mathematica
    Select[Table[If[PrimeQ[n],Nothing,n^2+n+1],{n,200}],PrimeQ] (* Harvey P. Dale, Apr 02 2023 *)
  • PARI
    lista(nn) = {for (n = 1, nn, if (! isprime(n) && isprime(p = n^2 + n + 1), print1(p, ", ");););} \\ Michel Marcus, Sep 04 2013

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

A257521 Odd Brazilian numbers.

Original entry on oeis.org

7, 13, 15, 21, 27, 31, 33, 35, 39, 43, 45, 51, 55, 57, 63, 65, 69, 73, 75, 77, 81, 85, 87, 91, 93, 95, 99, 105, 111, 115, 117, 119, 121, 123, 125, 127, 129, 133, 135, 141, 143, 145, 147, 153, 155, 157, 159, 161, 165, 171, 175, 177, 183, 185, 187, 189, 195
Offset: 1

Views

Author

Daniel Lignon, Apr 27 2015

Keywords

Comments

All even integers 2p >=8 are Brazilian numbers (A125134), because 2p=2(p-1)+2 is written 22 in base p-1 if p-1>2, that is true if p >=4. But, among Brazilian numbers, there are also odd ones...
The only square of a prime is 121. - Robert G. Wilson v, May 21 2015

Crossrefs

Cf. A125134 (Brazilian numbers), A253261 (odd Brazilian squares).
Cf. A085104 (prime Brazilian numbers).

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    for b from 2 to floor(N/2-1) do
       dk:= 1 + (b mod 2);
       for j from 1 to b-1 by 2 do
         for k from dk by dk do
           if j=1 and k=1 then next fi;
           x:= j*(b^(k+1)-1)/(b-1);
           if x > N then break fi;
           B[x]:= 1;
         od
       od
    od:
    sort(map(op,[indices(B)])); # Robert Israel, May 27 2015
  • Mathematica
    fQ[n_] := Block[{b = 2}, While[b < n - 1 && Length[ Union[ IntegerDigits[n, b]]] > 1, b++]; b < n - 1]; Select[1 + 2 Range@100, fQ] (* Robert G. Wilson v, May 21 2015 *)
  • PARI
    forstep(n=5, 300, 2, for(b=2, n-2, d=digits(n, b); if(vecmin(d)==vecmax(d), print1(n, ", "); break))) \\ Derek Orr, Apr 30 2015

A284758 The least positive integer that has exactly n different representations as Brazilian number.

Original entry on oeis.org

1, 7, 15, 24, 40, 60, 144, 120, 180, 336, 420, 360, 900, 960, 720, 840, 1260, 1440, 2340, 1680, 2880, 3600, 8190, 2520, 9072, 9900, 6300, 6720, 20592, 5040, 10920, 7560, 31320, 98040, 25920, 10080, 21420, 177156, 74256, 15120, 28560, 20160
Offset: 0

Views

Author

Bernard Schott, Apr 04 2017

Keywords

Comments

The representation n = 11_(n-1) is not accepted under the definition of a Brazilian number.
The records of this sequence are the highly Brazilian numbers; hence, this sequence is a supersequence of A329383.

Examples

			a(0) = 1 because 1 is the smallest non-Brazilian number.
a(4) = 40 because 40 = 1111_3 = 55_7 = 44_9 = 22_19 and 40 is the smallest integer with four Brazilian representations.
		

References

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

Crossrefs

Programs

  • Mathematica
    rep[n_] := Length@ Select[Range[2, n/2], 1 == Length@ Union@ IntegerDigits[n, #] &]; a[n_] := Block[{k=1}, While[rep[k] != n, k++]; k]; a /@ Range[0, 15] (* Giovanni Resta, Apr 04 2017 *)

A285017 Primes of the form 1 + n + n^2 + n^3 + ... + n^k, n > 1, k > 1 where n is not prime.

Original entry on oeis.org

43, 73, 157, 211, 241, 421, 463, 601, 757, 1123, 1483, 2551, 2971, 3307, 3907, 4423, 4831, 5701, 6007, 6163, 6481, 8191, 9901, 11131, 12211, 12433, 13807, 14281, 19183, 20023, 20593, 21757, 22621, 22651, 23563, 24181, 26083, 26407, 27061, 28393, 31153, 35533
Offset: 1

Views

Author

Bernard Schott, Apr 08 2017

Keywords

Comments

These numbers are Brazilian primes belonging to A085104.
Brazilian primes with n prime are A023195, except 3 which is not Brazilian.
A085104 = This sequence Union { A023195 \ number 3 }.
k + 1 is necessarily prime, but that's not sufficient: 1 + 10 + 100 = 111.
Most of these terms come from A185632 which are prime numbers 111_n with n no prime, the first other term is 22621 = 11111_12, the next one is 245411 = 11111_22.
Number of terms < 10^k: 0, 2, 9, 23, 64, 171, 477, 1310, 3573, 10098, ..., . - Robert G. Wilson v, Apr 15 2017

Examples

			157 = 12^2 + 12 + 1 = 111_12 is prime and 12 is composite.
		

Crossrefs

Programs

  • Maple
    N:= 40000: # to get all terms <= N
    res:= NULL:
    for k from 2 to ilog2(N) do if isprime(k) then
      for n from 2 do
        p:= (n^(k+1)-1)/(n-1);
        if p > N then break fi;
        if isprime(p) and not isprime(n) then res:= res, p fi
    od fi od:
    res:= {res}:
    sort(convert(res,list)); # Robert Israel, Apr 14 2017
  • Mathematica
    mx = 36000; g[n_] := Select[Drop[Accumulate@Table[n^ex, {ex, 0, Log[n, mx]}], 2], PrimeQ]; k = 1; lst = {}; While[k < Sqrt@mx, If[CompositeQ@k, AppendTo[lst, g@k]; lst = Sort@Flatten@lst]; k++]; lst (* Robert G. Wilson v, Apr 15 2017 *)
  • PARI
    isok(n) = {if (isprime(n), forcomposite(b=2, n, d = digits(n, b); if ((#d > 2) && (vecmin(d) == 1) && (vecmax(d)== 1), return(1)););); return(0);} \\ Michel Marcus, Apr 09 2017
    
  • PARI
    A285017_vec(n)={my(h=vector(n,i,1),y,c,z=4,L:list);L=List();forprime(x=3,,forcomposite(m=z,x-1,y=digits(x,m);if((y==h[1..#y])&&2<#y,listput(L,x);z=m;if(c++==n,return(Vec(L))))))} \\ R. J. Cano, Apr 18 2017

A308851 Numbers >= 2 all of whose divisors > 1 are Brazilian.

Original entry on oeis.org

7, 13, 31, 43, 73, 91, 127, 157, 211, 217, 241, 301, 307, 403, 421, 463, 511, 559, 601, 757, 889, 949, 1093, 1099, 1123, 1333, 1477, 1483, 1651, 1687, 1723, 2041, 2149, 2263, 2551, 2743, 2801, 2821, 2947, 2971, 3133, 3139, 3241, 3307, 3541, 3907, 3913, 3937
Offset: 1

Views

Author

Bernard Schott, Jun 28 2019

Keywords

Comments

The terms of this sequence are the Brazilian primes and the products of two or more distinct Brazilian primes.
There are no even numbers because 2 is not Brazilian.

Examples

			91 is a term because all divisors of 91 that are > 1: {7, 13, 91} are Brazilian numbers with 7 = 111_2, 13 = 111_3 and 91 = 77_12.
		

Crossrefs

Cf. A085104 (subsequence), A125134.
Similar with even numbers: A000079, with odd numbers: A005408, with palindromes: A062687, with repdigits: A190217.

Programs

  • Mathematica
    brazQ[n_] := Block[{k, b, ok}, If[FindInstance[k (1 + b) == n && 1 < b < n - 1 && 0 < k < b, {k, b}, Integers] != {}, True, b = 2; ok = False; While[1 + b + b^2 <= n && ! ok, ok = Length@ Union@ IntegerDigits[n, b++] == 1]; ok]]; Select[ Range[3, 4000, 2], AllTrue[ Rest@ Divisors@ #, brazQ] &] (* Giovanni Resta, Jun 29 2019 *)
    max = 5000; fQ[n_] := Module[{b = 2, found = False}, While[b < n - 1 && Length[Union[IntegerDigits[n, b]]] > 1, b++]; b < n - 1]; A125134 = Select[Range[4, max], fQ]; Select[Range[2, max], Intersection[A125134, Rest[Divisors[#]]] == Rest[Divisors[#]] &] (* Vaclav Kotesovec, Jun 29 2019, using a subroutine from T. D. Noe *)
  • PARI
    isb(n) = for(b=2, n-2, d=digits(n, b); if(vecmin(d)==vecmax(d), return(1)));
    isok(n) = {fordiv(n, d, if ((d>1) && ! isb(d), return (0));); return (1);} \\ Michel Marcus, Jun 29 2019
Previous Showing 21-30 of 64 results. Next