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-8 of 8 results.

A126589 Numbers n>1 such that prime of the form (n^k-1)/(n-1) does not exist for k>2; or A128164(n) = 0.

Original entry on oeis.org

4, 9, 16, 25, 32, 36, 49, 64, 81, 100, 121, 125, 144, 169, 196, 216, 225, 243, 256, 289, 324, 343, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1000, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1728, 1764, 1849, 1936, 2025
Offset: 1

Views

Author

Alexander Adamchuk, Mar 13 2007

Keywords

Comments

Appears to be the union of the perfect squares k^2 (for k>1) and the prime powers p^k (for k>1) with some exceptions, such as 2^3, 3^3, 2^7, etc.
The perfect powers except those of the form n^(p^m) where p and (n^(p^(m+1))-1)/(n^(p^m)-1) are primes, p>2 and m>=1. - Max Alekseyev, Mar 09 2009

Examples

			A128164 begins with offset 2: {3, 3, 0, 3, 3, 5, 3, 0, 19, 17, 3, 5, 3, 3, 0, 3, ...}. Thus a(1) = 4, a(2) = 9, a(3) = 16.
		

Crossrefs

Extensions

Extended by Max Alekseyev, Mar 09 2009

A218721 a(n) = (18^n-1)/17.

Original entry on oeis.org

0, 1, 19, 343, 6175, 111151, 2000719, 36012943, 648232975, 11668193551, 210027483919, 3780494710543, 68048904789775, 1224880286215951, 22047845151887119, 396861212733968143, 7143501829211426575, 128583032925805678351
Offset: 0

Views

Author

M. F. Hasler, Nov 04 2012

Keywords

Comments

Partial sums of powers of 18 (A001027), q-integers for q=18: diagonal k=1 in triangle A022182.
Partial sums are in A014901. Also, the sequence is related to A014935 by A014935(n) = n*a(n) - Sum_{i=0..n-1} a(i), for n>0. - Bruno Berselli, Nov 06 2012
From Bernard Schott, May 06 2017: (Start)
Except for 0, 1 and 19, all terms are Brazilian repunits numbers in base 18, and so belong to A125134. From n = 3 to n = 8286, all terms are composite. See link "Generalized repunit primes".
As explained in the extensions of A128164, a(25667) = (18^25667 - 1)/17 would be (is) the smallest prime in base 18. (End)

Examples

			a(3) = (18^3 - 1)/17 = 343 = 7 * 49; a(6) = (18^6 - 1)/17 = 2000719 = 931 * 2149. - _Bernard Schott_, May 01 2017
		

Crossrefs

Programs

Formula

a(n) = floor(18^n/17).
G.f.: x/((1-x)*(1-18*x)). - Bruno Berselli, Nov 06 2012
a(n) = 19*a(n-1) - 18*a(n-2). - Vincenzo Librandi, Nov 07 2012
E.g.f.: exp(x)*(exp(17*x) - 1)/17. - Stefano Spezia, Mar 11 2023

A084742 Least k such that (n^k+1)/(n+1) is prime, or 0 if no such prime exists.

Original entry on oeis.org

3, 3, 3, 5, 3, 3, 0, 3, 5, 5, 5, 3, 7, 3, 3, 7, 3, 17, 5, 3, 3, 11, 7, 3, 11, 0, 3, 7, 139, 109, 0, 5, 3, 11, 31, 5, 5, 3, 53, 17, 3, 5, 7, 103, 7, 5, 5, 7, 1153, 3, 7, 21943, 7, 3, 37, 53, 3, 17, 3, 7, 11, 3, 0, 19, 7, 3, 757, 11, 3, 5, 3, 7, 13, 5, 3, 37, 3, 3, 5, 3, 293, 19, 7, 167, 7, 7, 709, 13, 3, 3, 37, 89, 71, 43, 37
Offset: 2

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 15 2003

Keywords

Comments

When (n^k+1)/(n+1) is prime, k must be prime. As mentioned by Dubner and Granlund, when n is a perfect power (the power is greater than 2), then (n^k+1)/(n+1) will usually be composite for all k, which is the case for n = 8, 27, 32 and 64. a(n) are only probable primes for n = {53, 124, 150, 182, 205, 222, 296}.
a(n) = 0 if n = {8, 27, 32, 64, 125, 243, ...}. - Eric Chen, Nov 18 2014
More terms: a(124) = 16427, a(150) = 6883, a(182) = 1487, a(205) = 5449, a(222) = 1657, a(296) = 1303. For n up to 300, a(n) is currently unknown only for n = {97, 103, 113, 175, 186, 187, 188, 220, 284}. All other terms up to a(300) are less than 1000. - Eric Chen, Nov 18 2014
a(97) > 31000. - Eric Chen, Nov 18 2014
a(311) = 2707, a(313) = 4451. - Eric Chen, Nov 20 2014
a(n)=3 if and only if n^2-n+1 is a prime; that is, n belongs to A055494. - Thomas Ordowski, Sep 19 2015
From Altug Alkan, Sep 29 2015: (Start)
a(n)=5 if and only if Phi(10, n) is prime and Phi(6, n) is composite. n belongs to A246392.
a(n)=7 if and only if Phi(14, n) is prime, and Phi(10, n) and Phi(6, n) are both composite. n belongs to A250174.
a(n)=11 if and only if Phi(22, n) is prime, and Phi(14, n), Phi(10, n) and Phi(6, n) are all composite. n belongs to A250178.
Where Phi(k, n) is the k-th cyclotomic polynomial. (End)
a(97) > 800000 (or a(97) = 0). - Wang Runsen, May 10 2023

Examples

			a(5) = 5 as (5^5 + 1)/(5 + 1) = 1 - 5 + 5^2 - 5^3 + 5^4 = 521 is a prime.
a(7) = 3 as (7^3 + 1)/(7 + 1) = 1 - 7 + 7^2 = 43 is a prime.
		

Crossrefs

Programs

  • PARI
    a(n) = {l=List([8, 27, 32, 64, 125, 243, 324, 343]); for(q=1, #l, if(n==l[q], return(0))); k=2; while(k, s=(n^prime(k)+1)/(n+1); if(ispseudoprime(s), return(prime(k))); k++)}
    n=2; while(n<361, print1(a(n), ", "); n++) \\ Eric Chen, Nov 25 2014

Extensions

More terms from T. D. Noe, Jan 22 2004

A084740 Least k such that (n^k-1)/(n-1) is prime, or 0 if no such prime exists.

Original entry on oeis.org

2, 3, 2, 3, 2, 5, 3, 0, 2, 17, 2, 5, 3, 3, 2, 3, 2, 19, 3, 3, 2, 5, 3, 0, 7, 3, 2, 5, 2, 7, 0, 3, 13, 313, 2, 13, 3, 349, 2, 3, 2, 5, 5, 19, 2, 127, 19, 0, 3, 4229, 2, 11, 3, 17, 7, 3, 2, 3, 2, 7, 3, 5, 0, 19, 2, 19, 5, 3, 2, 3, 2, 5, 5, 3, 41, 3, 2, 5, 3, 0, 2, 5, 17, 5, 11, 7, 2, 3, 3, 4421, 439, 7, 5, 7, 2, 17, 13, 3, 2, 3, 2, 19, 97, 3, 2, 17, 2, 17, 3, 3, 2, 23, 29, 7, 59
Offset: 2

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 15 2003

Keywords

Comments

When (n^k-1)/(n-1) is prime, k must be prime. As mentioned by Dubner, when n is a perfect power, then (n^k-1)/(n-1) will usually be composite for all k, which is the case for n = 9, 25, 32, 49, 64, 81, 121, 125, 144, 169, 216, 225, 243, 289, 324, 343, ... - T. D. Noe, Jan 30 2004
a(152) > prime(1100) or 0. - Derek Orr, Nov 29 2014
a(n)=2 if and only if n=p-1, where p is an odd prime; that is, n belongs to A006093, except 2. - Thomas Ordowski, Sep 19 2015
Probably a(152) = 270217 since (152^270217-1)/(152-1) has been shown to be probably prime. - Michael Stocker, Jan 24 2019

Examples

			a(7) = 5 as (7^5 - 1 )/(7 - 1) = 2801 = 1 + 7 + 7^2 + 7^3 + 7^4 is a prime but no smaller partial sum yields a prime.
		

Crossrefs

Programs

  • PARI
    a(n) = {l=List([9, 25, 32, 49, 64, 81, 121, 125, 144, 169, 216, 225, 243, 289, 324, 343]); for(q=1, #l, if(n==l[q], return(0))); k=1; while(k, s=(n^prime(k)-1)/(n-1); if(ispseudoprime(s), return(prime(k))); k++)}
    n=2; while(n<361, print1(a(n), ", "); n++) \\ Derek Orr, Jul 13 2014

Extensions

More terms from T. D. Noe, Jan 23 2004

A074386 Numbers k such that sigma(k) is the square of a prime.

Original entry on oeis.org

3, 81, 400
Offset: 1

Views

Author

Labos Elemer, Aug 22 2002

Keywords

Comments

The next term, if it exists, is > 10^11. - Donovan Johnson, Aug 24 2012
a(4), if it exists, satisfies sigma(a(4)) > 10^36. - Hiroaki Yamanouchi, Sep 10 2014
If n belongs to this sequence, it may have at most two distinct prime divisors. If n=p^k, then sigma(p^k) = (p^(k+1)-1)/(p-1) = r^2 for some prime r. For k=1, it trivially has the only solution n=3; while for k>1 it is a partial case of the Nagell-Ljunggren equation and has the only prime solution r=11 (see Bennett-Levin 2015) corresponding to n=3^4=81. If n=p^k*q^m, then sigma(n) = (p^(k+1)-1)/(p-1) * (q^(m+1)-1)/(q-1) = r^2 for some prime r, implying that (p^(k+1)-1)/(p-1) = (q^(m+1)-1)/(q-1) = r. Here k+1 and m+1 must be odd distinct primes. The Goormaghtigh conjecture would imply that its only solution is n=400 with (p,k,q,m)=(5,2,2,4). - Max Alekseyev, Apr 24 2015

Examples

			sigma[{3,81,400}]={4,121,961}.
		

Crossrefs

Programs

  • Mathematica
    Do[s=DivisorSigma[1, n]; If[PrimeQ[Sqrt[s]], Print[n]], {n, 1, 1000000}] (* Corrected by N. J. A. Sloane, May 26 2008 *)

Extensions

Definition corrected by Juan Lopez, May 26 2008
Edited by N. J. A. Sloane, May 26 2008

A285642 Smallest Brazilian prime in base n, or 0 if no such prime exists.

Original entry on oeis.org

7, 13, 0, 31, 43, 2801, 73, 0, 1111111111111111111, 50544702849929377, 157, 30941, 211, 241, 0, 307
Offset: 2

Views

Author

Bernard Schott, Apr 23 2017

Keywords

Comments

Also the smallest prime of the form (n^k - 1)/(n - 1) with k > 2. The corresponding values of k are in A128164.
For n = 18, a(n) = (18^25667 - 1)/17 as explained in the extension of A128164, but it is too large to write in the Data field.
Differs from A084738: in A084738, the primes of the form (n^2 - 1)/(n - 1) = n + 1 are included, for instance 7 = 6 + 1 = 11_6 but not included here, so a(6) = 43 = 111_6.
As mentioned by Dubner, see link, when n is a power of a prime ( >= 2 ), the number (n^k - 1)/(n - 1) with k > 2 is usually composite, so a(4) = a(9) = a(16) = a(25) = 0 for instance, exception a(8) = 73.
Values of a(19)-a(31): {109912203092239643840221, 421, 463, 245411, 292561, 601, 0, 321272407, 757, 637421, 732541, 837931, 917087137}. - Michael De Vlieger, Apr 24 2017

Examples

			a(7) = (7^5 - 1)/6 = 11111_7 =  1 + 7 + 7^2 + 7^3 + 7^4 = 2801.
a(10) is the repunit R_19 which is a string of nineteen 1's.
		

Crossrefs

Programs

  • Mathematica
    Table[Function[m, If[m > 0, k = 3; While[! PrimeQ[Set[x, (m^k - 1)/(m - 1)]], k++]; x, 0]]@ If[Set[e, GCD @@ #[[All, -1]]] > 1, {#, IntegerExponent[n, #]} &@ Power[n, 1/e] /. {{k_, m_} /; Or[Not[PrimePowerQ@ m], Prime@ m, FactorInteger[m][[1, 1]] == 2] :> 0, {k_, m_} /; m > 1 :> n}, n] &@ FactorInteger@ n, {n, 2, 17}] (* Michael De Vlieger, Apr 24 2017 *)

A133857 Numbers k such that (18^k - 1)/17 is prime.

Original entry on oeis.org

2, 25667, 28807, 142031, 157051, 180181, 414269, 1270141
Offset: 1

Views

Author

Alexander Adamchuk, Sep 28 2007

Keywords

Comments

Repunits in base 18 are off to a slow start compared with all the repunits in bases from -20 to 20. There are only 4 repunit primes in base 18 with exponents searched up to 150,000 while most other bases have 7-10 by then. Even after scaling the rate by logb logb, this is relatively low. - Paul Bourdelais, Mar 12 2010
With the discovery of a(6), this sequence of base-18 repunits is converging nicely to a rate close to Euler's constant with G=0.6667. - Paul Bourdelais, Mar 17 2010
With the discovery of a(7), G=0.54789, which is very close to the expected constant 0.56145948 mentioned in the Generalized Repunit Conjecture below. - Paul Bourdelais, Dec 08 2014

Examples

			a(1) = A084740(18) = 2,
a(2) = A128164(18) = 25667.
		

Crossrefs

Cf. A128164 (least k>2 such that (n^k-1)/(n-1) is prime).
Cf. A084740 (least k such that (n^k-1)/(n-1) is prime).
Cf. A126589 (numbers n>1 such that prime of the form (n^k-1)/(n-1) does not exist for k>2).

Programs

Extensions

a(2) = 25667 and a(3) = 28807 found by Henri Lifchitz, Sep 2007
a(4) corresponds to a probable prime discovered by Paul Bourdelais, Mar 12 2010
a(5) corresponds to a probable prime discovered by Paul Bourdelais, Mar 15 2010
a(6)=180181, previously discovered by Andy Steward in April 2007 in the form of the cyclotomic number Phi(180181,18), added by Paul Bourdelais, Mar 23 2010
a(7) corresponds to a probable prime discovered by Paul Bourdelais, Dec 08 2014
a(8) from Paul Bourdelais, Dec 02 2021

A247093 Triangle read by rows: T(m,n) = smallest odd prime p such that (m^p-n^p)/(m-n) is prime (0

Original entry on oeis.org

3, 3, 3, 0, 0, 3, 3, 5, 13, 3, 3, 0, 0, 0, 5, 5, 3, 3, 5, 3, 3, 3, 0, 3, 0, 19, 0, 7, 0, 3, 0, 0, 3, 0, 3, 7, 19, 0, 3, 0, 0, 0, 31, 0, 3, 17, 5, 3, 3, 5, 3, 5, 7, 5, 3, 3, 0, 0, 0, 3, 0, 3, 0, 0, 0, 3, 5, 3, 7, 5, 5, 3, 7, 3, 3, 251, 3, 17, 3, 0, 5, 0, 151, 0, 0, 0, 59, 0, 5, 0, 3, 3, 5, 0, 1097, 0, 0, 3, 3, 0, 0, 7, 0, 17, 3
Offset: 1

Views

Author

Eric Chen, Nov 18 2014

Keywords

Comments

T(m,n) is 0 if and only if m and n are not coprime or A052409(m) and A052409(n) are not coprime. (The latter has some exceptions, like T(8,1) = 3. In fact, if p is a prime and does not equal to A052410(gcd(A052409(m),A052409(n))), then (m^p-n^p)/(m-n) is composite, so if it is not 0, then it is A052410(gcd(A052409(m),A052409(n))).) - Eric Chen, Nov 26 2014
a(i) = T(m,n) corresponds only to probable primes for (m,n) = {(15,4), (18,1), (19,18), (31,6), (37,22), (37,25), ...} (i={95, 137, 171, 441, 652, 655, ...}). With the exception of these six (m,n), all corresponding primes up to a(663) are definite primes. - Eric Chen, Nov 26 2014
a(n) is currently known up to n = 663, a(664) = T(37, 34) > 10000. - Eric Chen, Jun 01 2015
For n up to 1000, a(n) is currently unknown only for n = 664, 760, and 868. - Eric Chen, Jun 01 2015

Examples

			Read by rows:
m\n        1   2   3   4   5   6   7   8   9   10  11
2          3
3          3   3
4          0   0   3
5          3   5   13  3
6          3   0   0   0   5
7          5   3   3   5   3   3
8          3   0   3   0   19  0   7
9          0   3   0   0   3   0   3   7
10         19  0   3   0   0   0   31  0   3
11         17  5   3   3   5   3   5   7   5   3
12         3   0   0   0   3   0   3   0   0   0   3
etc.
		

Crossrefs

Cf. A128164 (n,1), A125713 (n+1,n), A125954 (2n+1,2), A122478 (2n+1,2n-1).
Cf. A000043 (2,1), A028491 (3,1), A057468 (3,2), A059801 (4,3), A004061 (5,1), A082182 (5,2), A121877 (5,3), A059802 (5,4), A004062 (6,1), A062572 (6,5), A004063 (7,1), A215487 (7,2), A128024 (7,3), A213073 (7,4), A128344 (7,5), A062573 (7,6), A128025 (8,3), A128345 (8,5), A062574 (8,7), A173718 (9,2), A128346 (9,5), A059803 (9,8), A004023 (10,1), A128026 (10,3), A062576 (10,9), A005808 (11,1), A210506 (11,2), A128027 (11,3), A216181 (11,4), A128347 (11,5), A062577 (11,10), A004064 (12,1), A128348 (12,5), A062578 (12,11).

Programs

  • Mathematica
    t1[n_] := Floor[3/2 + Sqrt[2*n]]
    m[n_] := Floor[(-1 + Sqrt[8*n-7])/2]
    t2[n_] := n-m[n]*(m[n]+1)/2
    b[n_] := GCD @@ Last /@ FactorInteger[n]
    is[m_, n_] := GCD[m, n] == 1 && GCD[b[m], b[n]] == 1
    Do[k=2, If[is[t1[n], t2[n]], While[ !PrimeQ[t1[n]^Prime[k] - t2[n]^Prime[k]], k++]; Print[Prime[k]], Print[0]], {n, 1, 663}] (* Eric Chen, Jun 01 2015 *)
  • PARI
    a052409(n) = my(k=ispower(n)); if(k, k, n>1);
    a(m, n) = {if (gcd(m,n) != 1, return (0)); if (gcd(a052409(m), a052409(n)) != 1, return (0)); forprime(p=3,, if (isprime((m^p-n^p)/(m-n)), return (p)););}
    tabl(nn) = {for (m=2, nn, for(n=1, m-1, print1(a(m,n), ", ");); print(););} \\ Michel Marcus, Nov 19 2014
    
  • PARI
    t1(n)=floor(3/2+sqrt(2*n))
    t2(n)=n-binomial(floor(1/2+sqrt(2*n)), 2)
    b(n)=my(k=ispower(n)); if(k, k, n>1)
    a(n)=if(gcd(t1(n),t2(n)) !=1 || gcd(b(t1(n)), b(t2(n))) !=1, 0, forprime(p=3,2^24,if(ispseudoprime((t1(n)^p-t2(n)^p)/(t1(n)-t2(n))), return(p)))) \\ Eric Chen, Jun 01 2015
Showing 1-8 of 8 results.