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

A372895 Squarefree terms of A129802 whose prime factors are neither elite (A102742) nor anti-elite (A128852), where A129802 is the possible bases for Pepin's primality test for Fermat numbers.

Original entry on oeis.org

551, 1387, 2147, 8119, 8227, 8531, 10483, 21907, 29261, 29543, 30229, 52909, 58133, 65683, 73657, 81257, 81797, 84491, 89053, 89281, 97907, 114017, 184987, 187891, 227557, 228997, 238111, 263017, 369721, 405631, 436897, 450607, 453041, 468541, 472967, 498817, 521327, 641297, 732127, 736003, 810179, 930677
Offset: 1

Views

Author

Jianing Song, May 15 2024

Keywords

Comments

By construction, A129802 is the disjoint union of the two following sets of numbers: (a) products of a square, some distinct anti-elite primes, an even number of elite-primes and a term here; (b) products of a square, some distinct anti-elite primes, an odd number of elite-primes and a term in A372896.

Crossrefs

Programs

  • PARI
    isA372895(n) = {
    if(n%2 && issquarefree(n) && isA129802(n), my(f = factor(n)~[1,]); \\ See A129802 for its program
    for(i=1, #f, my(p=f[i], d = znorder(Mod(2, p)), StartPoint = valuation(d, 2), LengthTest = znorder(Mod(2, d >> StartPoint)), flag = 0); \\ To check if p = f[i] is an elite prime or an anti-elite prime, it suffices to check (2^2^i + 1) modulo p for StartPoint <= i <= StartPoint + LengthTest - 1; see A129802 or A372894
    for(j = StartPoint+1, StartPoint + LengthTest - 1, if(issquare(Mod(2, p)^2^j + 1) != issquare(Mod(2, p)^2^StartPoint + 1), flag = 1; break())); if(flag == 0, return(0))); 1, 0)
    }

A372896 Squarefree terms of A372894 whose prime factors are neither elite (A102742) nor anti-elite (A128852).

Original entry on oeis.org

1, 341, 671, 1891, 2117, 3277, 4033, 5461, 8249, 12557, 13021, 14531, 19171, 24811, 31609, 32777, 33437, 40951, 46139, 48929, 49981, 50737, 73279, 80581, 84169, 100253, 116143, 130289, 135923, 136271, 149437, 175577, 179783, 194417, 252361, 272491, 342151, 343027, 376169, 390641
Offset: 1

Views

Author

Jianing Song, May 15 2024

Keywords

Comments

By construction, A372894 is the disjoint union of the two following sets of numbers: (a) products of a square, some distinct anti-elite primes, an even number of elite-primes and a term here; (b) products of a square, some distinct anti-elite primes, an odd number of elite-primes and a term in A372895.

Crossrefs

Programs

  • PARI
    isA372896(n) = {
    if(n%2 && issquarefree(n) && isA372894(n), if(n==1, return(1)); my(f = factor(n)~[1,]); \\ See A372894 for its program
    for(i=1, #f, my(p=f[i], d = znorder(Mod(2, p)), StartPoint = valuation(d, 2), LengthTest = znorder(Mod(2, d >> StartPoint)), flag = 0); \\ To check if p = f[i] is an elite prime or an anti-elite prime, it suffices to check (2^2^i + 1) modulo p for StartPoint <= i <= StartPoint + LengthTest - 1; see A129802 or A372894
    for(j = StartPoint+1, StartPoint + LengthTest - 1, if(issquare(Mod(2, p)^2^j + 1) != issquare(Mod(2, p)^2^StartPoint + 1), flag = 1; break())); if(flag == 0, return(0))); 1, 0)
    }

A372891 Anti-elite primes (A128852) that are not prime factors of Fermat primes (A023394).

Original entry on oeis.org

2, 13, 97, 193, 241, 673, 769, 2689, 5953, 8929, 12289, 40961, 49921, 61681, 101377, 286721, 414721, 417793, 550801, 786433, 1130641, 1376257, 1489153, 1810433, 3602561, 6942721, 7340033, 11304961, 12380161, 15790321, 17047297, 22253377, 39714817, 67411969, 89210881, 93585409, 113246209, 119782433, 152371201, 171048961, 185602561, 377487361, 394783681
Offset: 1

Views

Author

Jianing Song, May 15 2024

Keywords

Comments

Union of {2} and odd anti-elite primes p such that the multiplicative order of 2 modulo p is not a power of 2.
A128852 is the union of this sequence and prime factors of Fermat numbers >= 17.
Conjecture: All terms >= 97 are congruent to 1 modulo 8. (Note that every factor of Fermat numbers >= 17 is congruent to 1 modulo 8.)

Examples

			For n >= 2, we have 2^2^n + 1 == 4 (mod 13) for even n and 2^2^n + 1 == 10 (mod 13) for odd n. As 4 and 10 are both squares modulo 13, and 13 is not a factor of Fermat numbers (the multiplicative order of 2 modulo 13 is 12), 13 is a term.
For n >= 4, we have 2^2^n + 1 == 62 (mod 97) for even n and 2^2^n + 1 == 36 (mod 97) for odd n. As 36 and 62 are both squares modulo 97, and 97 is not a factor of Fermat numbers (the multiplicative order of 2 modulo 97 is 48), 97 is a term.
		

Crossrefs

Programs

  • PARI
    isA372891(n) = if(isprime(n) && n > 2, my(d = znorder(Mod(2, n))); if(isprimepower(2*d), return(0)); my(StartPoint = valuation(d, 2), LengthTest = znorder(Mod(2, d >> StartPoint))); for(i = StartPoint, StartPoint + LengthTest - 1, if(!issquare(Mod(2, n)^2^i + 1), return(0))); 1, n == 2)

A102742 Elite primes: a prime number p is called elite if only a finite number of Fermat numbers 2^(2^n)+1 are quadratic residues mod p.

Original entry on oeis.org

3, 5, 7, 41, 15361, 23041, 26881, 61441, 87041, 163841, 544001, 604801, 6684673, 14172161, 159318017, 446960641, 1151139841, 3208642561, 38126223361, 108905103361, 171727482881, 318093312001, 443069456129, 912680550401, 1295536619521, 1825696645121, 2061584302081
Offset: 1

Views

Author

Tom Mueller, Feb 08 2005; extended Jun 16 2005

Keywords

Comments

Křížek, Luca, Shparlinski, & Somer show that a(n) >> n log^2 n. - Charles R Greathouse IV, Jan 25 2017
Let d = 2^r*d' be the multiplicative order of 2 modulo p. Note that 2^2^s == 2^d == 1 (mod p), so p divides none of.

Crossrefs

Cf. A128852, A344785. Subsequence of A129802.

Programs

  • PARI
    list_upto(N)={forprime(p=3,N,r=2^valuation(p-1,2); a=Mod(3,p); v=List(); k=0; while(1,listput(v,a); a=(a-1)^2+1; for(j=1,#v,if(v[j]==a,k=j;break(2)))); for(i=k,#v,znorder(v[i]) % r != 0 && next(2)); print1(p,", "))} \\ Slow, only for illustration, Jeppe Stig Nielsen, Jan 28 2020
    
  • PARI
    isElite(n) = if(isprime(n) && n > 2, my(d = znorder(Mod(2,n)), StartPoint = valuation(d,2), LengthTest = znorder(Mod(2, d >> StartPoint))); for(i = StartPoint, StartPoint + LengthTest - 1, if(issquare(Mod(2,n)^2^i + 1), return(0))); 1, 0) \\ Jianing Song, May 15 2024

Formula

Sum_{n>=1} 1/a(n) = A344785. - Amiram Eldar, May 30 2021

Extensions

a(17) from Tom Mueller, Jul 20 2005
a(18)-a(21) from Tom Mueller, Apr 18 2006
6 further terms from Tom Mueller, Apr 16 2007

A129802 Possible bases for Pepin's primality test for Fermat numbers.

Original entry on oeis.org

3, 5, 6, 7, 10, 12, 14, 20, 24, 27, 28, 39, 40, 41, 45, 48, 51, 54, 56, 63, 65, 75, 78, 80, 82, 85, 90, 91, 96, 102, 105, 108, 112, 119, 125, 126, 130, 147, 150, 156, 160, 164, 170, 175, 180, 182, 192, 204, 210, 216, 224, 238, 243, 245, 250, 252, 260, 291, 294, 300
Offset: 1

Views

Author

Max Alekseyev, Jun 14 2007, corrected Dec 29 2007. Thanks to Ant King for pointing out an error in the earlier version of this sequence

Keywords

Comments

Prime elements of this sequence are given by A102742.
From Jianing Song, May 15 2024: (Start)
Let m be an odd number and ord(2,m) = 2^r*d be the multiplicative order of 2 modulo m, where d is odd, then 2^2^n + 1 is congruent to one of 2^2^r + 1, 2^2^(r+1) + 1, ..., 2^2^(r+ord(2,d)-1) + 1 modulo m, so it suffices to check these ord(2,d) numbers.
Note that if m > 1, then m does not divide 2^2^n + 1 for n >= r, otherwise we would have 2^(2^n*d) = (2^ord(2,m))^2^(n-r) == 1 (mod m) and 2^(2^n*d) = (2^2^n)^d == (-1)^d == -1 (mod m). As a result, m is a term if and only if the Jacobi symbol ((2^2^n + 1)/m) is equal to -1 for m = r, r+1, ..., r+ord(2,d)-1.
By definition, a squarefree number that is a product of elite primes (A102742) or anti-elite primes (A128852) is a term if and only if its number of elite factors is odd. But a squarefree term can have factors that are neither elite nor anti-elite, the smallest being 551 = 19*29. (End)

Examples

			For n >= 2, we have 2^2^n + 1 == 170, 461, 17, 257, 519, 539 (mod 551) respectively for n == 0, 1, 2, 3, 4, 5 (mod 6). As we have (170/551) = (461/551) = (17/551) = (257/551) = (519/551) = (539/551) = -1, 551 is a term. - _Jianing Song_, May 19 2024
		

Crossrefs

Programs

  • PARI
    { isPepin(n) = local(s,S=Set(),t); n\=2^valuation(n,2); s=Mod(3,n); while( !setsearch(S,s), S=setunion(S,[s]); s=(s-1)^2+1); t=s; until( t==s, if( kronecker(lift(t),n)==1, return(0)); t=(t-1)^2+1);1 }
    for(n=2,1000,if(isPepin(n),print1(n,", ")))
    
  • PARI
    for(b=2, 300, k=b/2^valuation(b, 2); if(k>1, i=logint(k, 2); m=Mod(2, k); z=znorder(m); e=znorder(Mod(2, z/2^valuation(z, 2))); t=0; for(c=1, e, if(kronecker(lift(m^2^(i+c))+1, k)==-1, t++, break)); if(t==e, print1(b, ", ")))); \\ Arkadiusz Wesolowski, Sep 22 2021
    
  • PARI
    isA129802(n) = n = (n >> valuation(n,2)); my(d = znorder(Mod(2, n)), StartPoint = valuation(d, 2), LengthTest = znorder(Mod(2, d >> StartPoint))); for(i = StartPoint, StartPoint + LengthTest - 1, if(kronecker(lift(Mod(2, n)^2^i + 1), n) == 1, return(0))); 1 \\ Jianing Song, May 19 2024

Formula

A positive integer 2^k*m, where m is odd and k >= 0, belongs to this sequence iff the Jacobi symbol (F_n/m) = 1 for only a finite number of Fermat numbers F_n = A000215(n).

A372894 A positive integer 2^k*m, where m is odd and k >= 0, belongs to this sequence iff the Jacobi symbol (F_n/m) = -1 for only a finite number of Fermat numbers F_n = A000215(n).

Original entry on oeis.org

1, 2, 4, 8, 9, 13, 15, 16, 17, 18, 21, 25, 26, 30, 32, 34, 35, 36, 42, 49, 50, 52, 60, 64, 68, 70, 72, 81, 84, 97, 98, 100, 104, 117, 120, 121, 123, 128, 135, 136, 140, 144, 153, 162, 168, 169, 189, 193, 194, 195, 196, 200, 205, 208, 221, 225, 234, 240, 241, 242, 246, 255, 256, 257, 270, 272, 273, 280, 287, 288, 289
Offset: 1

Views

Author

Jianing Song, May 15 2024

Keywords

Comments

Can be seen as the opposite of A129802.
Let m be an odd number and ord(2,m) = 2^r*d be the multiplicative order of 2 modulo m, where d is odd, then 2^2^n + 1 is congruent to one of 2^2^r + 1, 2^2^(r+1) + 1, ..., 2^2^(r+ord(2,d)-1) + 1 modulo m, so it suffices to check these ord(2,d) numbers.
Note that if m > 1, then m does not divide 2^2^n + 1 for n >= r, otherwise we would have 2^(2^n*d) = (2^ord(2,m))^2^(n-r) == 1 (mod m) and 2^(2^n*d) = (2^2^n)^d == (-1)^d == -1 (mod m). As a result, m is a term if and only if the Jacobi symbol ((2^2^n + 1)/m) is equal to 1 for m = r, r+1, ..., r+ord(2,d)-1.
By definition, a squarefree number that is a product of elite primes (A102742) or anti-elite primes (A128852) is a term if and only if its number of elite factors is even. But a squarefree term can have factors that are neither elite nor anti-elite, the smallest being 341 = 11*31.
Contains divisors of Fermat numbers >= 17 (A307843 \ {3,5}) since they are products of elite primes.

Examples

			For n >= 1, we have 2^2^n + 1 == 65, 5, 17, 257 (mod 341) respectively for n == 0, 1, 2, 3 (mod 4). As we have (65/341) = (5/341) = (17/341) = (257/341) = 1, 341 is a term.
		

Crossrefs

Prime elements of this sequence are given by A128852.

Programs

  • PARI
    isA372894(n) = n = (n >> valuation(n,2)); my(d = znorder(Mod(2, n)), StartPoint = valuation(d, 2), LengthTest = znorder(Mod(2, d >> StartPoint))); for(i = StartPoint, StartPoint + LengthTest - 1, if(kronecker(lift(Mod(2, n)^2^i + 1), n) == -1, return(0))); 1
Showing 1-6 of 6 results.