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

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)
    }

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).

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)
    }
Showing 1-3 of 3 results.