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 11-20 of 28 results. Next

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

A152677 Subsequence of odd terms in A000203 (sum-of-divisors function sigma), in the order in which they occur and with repetitions.

Original entry on oeis.org

1, 3, 7, 15, 13, 31, 39, 31, 63, 91, 57, 93, 127, 195, 121, 171, 217, 133, 255, 403, 363, 183, 399, 465, 403, 399, 511, 819, 307, 847, 549, 381, 855, 961, 741, 1209, 931, 1023, 553, 1651, 921, 781, 1815, 1281, 1143, 1093, 1767, 1953, 871, 2223, 2821, 993, 1995
Offset: 1

Views

Author

Omar E. Pol, Dec 10 2008

Keywords

Comments

Equivalently: subsequence of A000203 (sigma) with indices equal to a square or twice a square (A028982).
See A060657 for the set of odd values in the range of the sigma function, i.e., the list of odd values in ordered by increasing size and without repetitions.

Crossrefs

Cf. A000203 (sigma = sum-of-divisors function), A152678 (even terms in A000203), A028982 (squares and twice the squares).
See A062700 and A023195 for the subsequence resp. subset of primes; A023194 for the indices of A000203 which yield these primes.
Cf. A002117.

Programs

  • Magma
    [d:k in [1..1000]|IsOdd(d) where d is DivisorSigma(1,k)]; // Marius A. Burtea, Jan 09 2020
  • Mathematica
    Select[DivisorSigma[1, Range[1000]], OddQ[#] &] (* Giovanni Resta, Jan 08 2020 *)
    With[{max = 1000}, DivisorSigma[1, Union[Range[Sqrt[max]]^2, 2*Range[Sqrt[max/2]]^2]]] (* Amiram Eldar, Nov 28 2023 *)
  • PARI
    A152677_upto(lim)=apply(sigma,vecsort(concat(vector(sqrtint(lim\1), i, i^2), vector(sqrtint(lim\2), i, 2*i^2)))) \\ Gives [a(n) = sigma(k) with k = A028982(n) <= lim]. - Charles R Greathouse IV, Feb 15 2013, corrected by M. F. Hasler, Jan 08 2020
    

Formula

a(n) = A000203(A028982(n)). - R. J. Mathar, Dec 12 2008
Sum_{k=1..n} a(k) ~ c * n^3, where c = (16-10*sqrt(2))*zeta(3)/Pi^2 = 0.226276... . - Amiram Eldar, Nov 28 2023

Extensions

Extended by R. J. Mathar, Dec 12 2008
Edited and definition reworded by M. F. Hasler, Jan 08 2020

A330832 Numbers of the form p*q, where p is prime and q=(p^k-1)/(p-1) is also prime for some integer k>1.

Original entry on oeis.org

6, 14, 39, 62, 155, 254, 3279, 5219, 16382, 19607, 70643, 97655, 208919, 262142, 363023, 402233, 712979, 1040603, 1048574, 1508597, 2265383, 2391483, 4685519, 5207819, 6728903, 21243689, 25239899, 56328959, 61035155, 67977559, 150508643, 310747739, 344964203
Offset: 1

Views

Author

Walter Kehowski, Jan 08 2020

Keywords

Comments

Also numbers with power-spectral basis {q,p^k}. The equation q=(p^k-1)/(p-1) is equivalent to the decomposition of the identity q + p^k = pq + 1 in Z/pqZ, and it is now easily verified that {q,p^k} is the spectral basis of p*q, consisting of primes and powers.
The numbers p^(r^e)*q, where p, q, r are primes, and q=(p^(r^e)-1)/(p^(r^(e-1))-1), e>0, have power-spectral basis {q,p^(r^e)}. However, the primes q for e>1 are usually quite large, while e=1 is accessible. For example, the table in A003424 has 4738 entries with all primes q<10^12, but only 8 have y>1.

Examples

			a(5) = 5*(5^3-1)/(5-1) = 5*31 = 155. The number 155 has spectral basis {31,125}.
		

Crossrefs

Formula

a(n) = A330833(n) * A330835(n).

A330833 a(n) = first prime factor p of the term A330832(n) = p*q.

Original entry on oeis.org

2, 2, 3, 2, 5, 2, 3, 17, 2, 7, 41, 5, 59, 2, 71, 13, 89, 101, 2, 17, 131, 3, 167, 173, 23, 29, 293, 383, 5, 13, 43, 677, 701, 743, 17, 761, 773, 827, 839, 857, 911, 1091, 1097, 5, 1163, 1181, 1193, 1217, 73, 1373, 1427, 79, 1487, 1559, 1583, 83, 2, 1709, 1811, 1847, 1931, 1973, 2129, 2273, 2309, 2339, 2411, 2663, 2729, 2789, 2957
Offset: 1

Views

Author

Walter Kehowski, Jan 08 2020

Keywords

Examples

			a(5) = 5 and, since A330834(5) = 3, then A330835(5) = (5^3-1)/(5-1) = 31 is prime.
		

Crossrefs

A330834 The exponents k of A330832, that is, if A330832(n)=p*q, where p is prime and q=(p^k-1)/(p-1) is prime, then a(n)=k.

Original entry on oeis.org

2, 3, 3, 5, 3, 7, 7, 3, 13, 5, 3, 7, 3, 17, 3, 5, 3, 3, 19, 5, 3, 13, 3, 3, 5, 5, 3, 3, 11, 7, 5, 3, 3, 3, 7, 3, 3, 3, 3, 3, 3, 3, 3, 13, 3, 3, 3, 3, 5, 3, 3, 5, 3, 3, 3, 5, 31, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 5, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 1

Views

Author

Walter Kehowski, Jan 08 2020

Keywords

Examples

			a(5) = 3, and, since A330833(5)=5, then A330835(5)=(5^3-1)/(5-1) = 31 is prime.
		

Crossrefs

A330835 Primes q appearing in A330832: that is, if A330832(n)=p*q, where p is prime and q=(p^k-1)/(p-1) is prime, then a(n)=q.

Original entry on oeis.org

3, 7, 13, 31, 31, 127, 1093, 307, 8191, 2801, 1723, 19531, 3541, 131071, 5113, 30941, 8011, 10303, 524287, 88741, 17293, 797161, 28057, 30103, 292561, 732541, 86143, 147073, 12207031, 5229043, 3500201, 459007, 492103, 552793, 25646167, 579883, 598303, 684757
Offset: 1

Views

Author

Walter Kehowski, Jan 08 2020

Keywords

Comments

The terms in the b-file are the same as those of A003424 with y=1, but with an ordering based on that of A330832. The ordering allows the inclusion of the only duplicate 2^5-1=31 and (5^3-1)/(5-1)=31.

Examples

			a(5)=31 since A330833(5)=5, A330834(5)=3, and (5^3-1)/(5-1) = 31 is prime.
		

Crossrefs

Formula

a(n) = (A330833(n) ^ A330834(n) - 1) / (A330833(n) - 1).

A368651 Numbers k such that 2^sigma(k) - k is a prime.

Original entry on oeis.org

3, 5, 17, 49, 53, 185, 503, 1301, 1689, 1797, 5929, 14747, 20433, 29903, 42137, 64763
Offset: 1

Views

Author

J.W.L. (Jan) Eerland, Jan 02 2024

Keywords

Comments

If it exists, a(17) > 120000. - Michael S. Branicky, Aug 19 2024

Examples

			5 is in the sequence because 2^sigma(5)-5 = 2^6-5 = 59 is prime.
		

Crossrefs

Programs

  • Magma
    [n: n in[1..10000] | IsPrime((2^SumOfDivisors(n)) - n)];
  • Mathematica
    a[n_] := Select[Range@ n, PrimeQ[2^DivisorSigma[1, #] - #] &]; a[20000]
    DeleteCases[ParallelTable[If[PrimeQ[2^DivisorSigma[1,k]-k],k,n],{k,1,10^4}],n]

Extensions

a(16) from J.W.L. (Jan) Eerland, Jan 25 2024

A127727 Primes of the form p^e - p^(e-1) + p^(e-2) - ... + (-1)^e, where p is prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 43, 61, 157, 521, 547, 683, 2731, 4423, 6163, 13421, 19183, 22651, 26407, 37057, 43691, 113233, 121453, 143263, 174763, 208393, 292141, 375157, 398581, 412807, 527803, 590593, 843643, 981091, 1041421, 1193557, 1246573
Offset: 1

Views

Author

T. D. Noe, Jan 25 2007

Keywords

Comments

These primes are important in studying k-imperfect numbers (A127724), see Iannucci-link. Except for the cases p^e = 3 and 8, which yield primes 2 and 5, e is an even number such that e+1 is prime. In fact, except for those two cases, all the primes are of the form (1+p^q)/(1+p), where q is an odd prime; that is, repunit primes with negative prime base.

Examples

			From _David A. Corneth_, Oct 28 2017: (Start)
For (p, e) = (3, 1) we have the prime 3^1 - 3^0 = 2.
For (p, e) = (2, 3) we have the prime 2^3 - 2^2 + 2^1 - 2^0 = 5.
The examples above are the cases mentioned in the comments not of the form (1+p^q)/(1+p). A prime of that form is below;
For (p, e) = (2, 4) we have the prime 2^4 - 2^3 + 2^2 - 2^1 + 2^0 = 11 = (1+p^(e+1)) / (1+p) = 33/3. (End)
		

Crossrefs

Programs

  • PARI
    upto(n) = {my(res = List([2,5])); forprime(p = 2, sqrtnint(n, 2), forprime(q = 3, logint(n * (1+p), p), r = (1+p^q)/(1+p); if(isprime(r), listput(res, r)))); listsort(res, 1); res} \\ David A. Corneth, Oct 28 2017

A253849 Numbers k such that 2^sigma(k) - 1 is a prime.

Original entry on oeis.org

2, 4, 9, 16, 25, 64
Offset: 1

Views

Author

Jaroslav Krizek, Jan 16 2015

Keywords

Comments

Also numbers n such that sigma(n) is in A000043, i.e., p = 2^sigma(n) - 1 is a Mersenne prime (A000668). The sequence of corresponding primes p reads: 7, 127, 8191, 2147483647, 2147483647, 170141183460469231731687303715884105727, ..., see A253851.
Subsequence of A023194 (numbers n such that sigma(n) is a prime), see there for an explanation why all terms except the first one are squares.
The sequence of values of sigma(a(n)) is 3, 7, 13, 31, 31, 127, ... and each term of this sequence must be a prime from the sequence of Mersenne exponents (A000043). See A253850.
Sequence differs from A023194 because A023194(7) = 289 but if a(7) exists, it must be a number n such that sigma(n) > A000043(43) = 30402457.
a(n) must be an even power of a prime. If it is the square of an odd prime, then this prime must be in A053182. If a(n) is an even power of 2, a(n)=2^(2k), then sigma(a(n))=2^(2k+1)-1. Thus, 2k+1 must be a double Mersenne prime exponent, i.e., such that the corresponding Mersenne prime is again a Mersenne exponent, cf. A103901. Only 4 such primes are known, and a(6)=2^6 (k=3) corresponds to the largest known prime of this type, 2^(2k+1)-1 = 127. - M. F. Hasler, Jan 21 2015

Examples

			4 is in the sequence because 2^sigma(4)-1 = 2^7-1 = 127 is prime.
		

Crossrefs

Programs

  • Magma
    [n: n in[1..10000] | IsPrime((2^SumOfDivisors(n)) - 1)];
  • Mathematica
    a253849[n_] := Select[Range@ n, PrimeQ[2^DivisorSigma[1, #] - 1] &]; a253849[20000] (* Michael De Vlieger, Jan 19 2015 *)

A367460 Numbers k such that 3^sigma(k) - k is a prime.

Original entry on oeis.org

1, 10, 52, 400, 2480, 7202, 28222
Offset: 1

Views

Author

J.W.L. (Jan) Eerland, Jan 26 2024

Keywords

Comments

a(8) > 67569.

Examples

			10 is in the sequence because 3^sigma(10) - 10 = 3^18 - 10 = 387420479 is prime.
		

Crossrefs

Programs

  • Magma
    [n: n in[1..10000] | IsPrime((3^SumOfDivisors(n)) - n)]
  • Mathematica
    a[n_] := Select[Range@ n, PrimeQ[3^DivisorSigma[1, #] - #] &]; a[20000]
    DeleteCases[ParallelTable[If[PrimeQ[3^DivisorSigma[1,k]-k],k,n],{k,1,10^4}],n]

Extensions

a(7) from Michael S. Branicky, Jan 27 2024
Previous Showing 11-20 of 28 results. Next