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

A322130 Fermat pseudoprimes to base 2 that are hexagonal.

Original entry on oeis.org

561, 2701, 4371, 8911, 10585, 18721, 33153, 49141, 93961, 104653, 115921, 157641, 226801, 289941, 314821, 334153, 534061, 665281, 721801, 831405, 873181, 915981, 1004653, 1373653, 1537381, 1755001, 1815465, 1987021, 2035153, 2233441, 2284453, 3059101, 3363121
Offset: 1

Views

Author

Amiram Eldar, Nov 27 2018

Keywords

Comments

Rotkiewicz proved that under Schinzel's Hypothesis H this sequence is infinite. His proof is the same as that of triangular pseudoprimes, since all the triangular numbers that he generates are also hexagonal (see comment in A320599).
Intersection of A001567 and A000384.
Subsequence of A293622.
The corresponding indices of the hexagonal numbers are 17, 37, 47, 67, 73, 97, 129, 157, 217, 229, 241, 281, 337, 381, 397, 409, 517, 577, 601, 645, 661, 677, 709, 829, 877, 937, 953, 997, ...

Crossrefs

Programs

  • Mathematica
    hex[n_] := n(2n-1); Select[hex[Range[1, 1000]], PowerMod[2, (# - 1), #]==1 &]
  • PARI
    isok(n) = ispolygonal(n, 6) && (Mod(2, n)^n==2) && !isprime(n) && (n>1); \\ Michel Marcus, Nov 28 2018

A320599 Numbers k such that 4k + 1 and 8k + 1 are both primes.

Original entry on oeis.org

9, 24, 39, 57, 84, 144, 150, 165, 207, 219, 234, 249, 252, 267, 309, 324, 357, 402, 414, 507, 522, 534, 555, 570, 639, 654, 759, 765, 777, 792, 795, 882, 924, 927, 942, 969, 1044, 1065, 1089, 1155, 1200, 1215, 1227, 1389, 1395, 1437, 1509, 1530, 1554, 1557
Offset: 1

Views

Author

Amiram Eldar, Nov 20 2018

Keywords

Comments

Rotkiewicz proved that if k is in this sequence then (4k + 1)*(8k + 1) is a triangular Fermat pseudoprime to base 2 (A293622), and thus under Schinzel's Hypothesis H there are infinitely many triangular Fermat pseudoprimes to base 2.
The corresponding pseudoprimes are 2701, 18721, 49141, 104653, 226801, 665281, 721801, ...

Examples

			9 is in the sequence since 4*9 + 1 = 37 and 8*9 + 1 = 73 are both primes.
		

Crossrefs

Intersection of A005098 and A005123.

Programs

  • Mathematica
    Select[Range[1000], PrimeQ[4#+1] && PrimeQ[8#+1] &]
  • PARI
    isok(n) = isprime(4*n+1) && isprime(8*n+1); \\ Michel Marcus, Nov 20 2018
    
  • Python
    from sympy import isprime
    def ok(n): return isprime(4*n + 1) and isprime(8*n + 1)
    print(list(filter(ok, range(1558)))) # Michael S. Branicky, Sep 24 2021

A321866 Indices of tetrahedral numbers that are Fermat pseudoprimes to base 2.

Original entry on oeis.org

3457, 16705, 21169, 28297, 30577, 45481, 114601, 123121, 127297, 140977, 156601, 159337, 312841, 393121, 418177, 437977, 443017, 453601, 509737, 518017, 521137, 539401, 545161, 545617, 657841, 679297, 704161, 717817, 762121, 775057, 832801, 904801, 996601
Offset: 1

Views

Author

Amiram Eldar, Nov 20 2018

Keywords

Comments

Numbers n such that n(n+1)(n+2)/6 is a Fermat pseudoprimes to base 2.
The corresponding tetrahedral Fermat pseudoprimes are 6891657409, 777080801185, 1581289265305, 3776730328549, 4765143438329, 15680770945781, 250856489370101, 311068284648121, 343806031110049, ...
Sierpinski asked for the existence of these numbers in 1965.

Examples

			3457 is in the sequence since A000292(3457) = 6891657409 is a Fermat pseudoprime to base 2.
		

Crossrefs

Programs

  • Mathematica
    fermatQ[n_,k_] := CompositeQ[n] && PowerMod[k,n-1,n]==1; p[n_] := n(n+1)(n+2)/6; seq={}; Do[p1=p[n]; If[fermatQ[p1,2], AppendTo[seq,n]], {n,1,1000000,2}]; seq
  • PARI
    isok(n) = my(t = n*(n+1)*(n+2)/6); (t != 1) && (Mod(2, t)^t == 2); \\ Michel Marcus, Nov 20 2018

A371759 a(n) is the smallest n-gonal number that is a Fermat pseudoprime to base 2 (A001567), or -1 if no such number exists.

Original entry on oeis.org

561, 1194649, 7957, 561, 23377, 341, 129889, 1105, 35333, 561, 204001, 31609, 2940337, 1105, 493697, 8481, 13981, 1905, 88561, 41665, 10680265, 1729, 107185, 264773, 449065, 6601, 2165801, 23001, 1141141, 13981, 272251, 4369, 17590957, 15841, 137149, 2821, 561
Offset: 3

Views

Author

Amiram Eldar, Apr 05 2024

Keywords

Comments

The corresponding indices of the n-gonal numbers are 33, 1093, 73, 17, 97, ... (A371760).

Examples

			a(4) = A001220(1)^2 = 1093^2 = 1194649. The only known square base-2 pseudoprimes are the squares of the Wieferich primes (A001220).
		

Crossrefs

Programs

  • Mathematica
    p[k_, n_] := ((n-2)*k^2 - (n-4)*k)/2; pspQ[n_] := CompositeQ[n] && PowerMod[2, n - 1, n] == 1; a[n_] := Module[{k = 2}, While[! pspQ[p[k, n]], k++]; p[k, n]]; Array[a, 50, 3]
  • PARI
    p(k, n) = ((n-2)*k^2 - (n-4)*k)/2;
    ispsp(n) = !isprime(n) && Mod(2, n)^(n-1) == 1;
    a(n) = {my(k = 2); while(!ispsp(p(k, n)), k++); p(k, n);}

Formula

a(n) = ((n-2)*k^2 - (n-4)*k)/2, where k = A371760(n).

A371760 a(n) is the smallest number k such that the k-th n-gonal number is a Fermat pseudoprime to base 2 (A001567), or -1 if no such number exists.

Original entry on oeis.org

33, 1093, 73, 17, 97, 11, 193, 17, 89, 11, 193, 73, 673, 13, 257, 33, 41, 15, 97, 65, 1009, 13, 97, 149, 190, 23, 401, 41, 281, 31, 133, 17, 1033, 31, 89, 13, 6, 59, 241, 157, 1217, 91, 145, 37, 937, 29, 1289, 73, 97, 41, 617, 19, 137, 151, 34, 103, 8641, 47, 82
Offset: 3

Views

Author

Amiram Eldar, Apr 05 2024

Keywords

Comments

The corresponding pseudoprimes are in A371759.

Crossrefs

Programs

  • Mathematica
    p[k_, n_] := ((n - 2)*k^2 - (n - 4)*k)/2; pspQ[n_] := CompositeQ[n] && PowerMod[2, n - 1, n] == 1; a[n_] := Module[{k = 2}, While[! pspQ[p[k, n]], k++]; k]; Array[a, 100, 3]
  • PARI
    p(k, n) = ((n-2)*k^2 - (n-4)*k)/2;
    ispsp(n) = !isprime(n) && Mod(2, n)^(n-1) == 1;
    a(n) = {my(k = 2); while(!ispsp(p(k, n)), k++); k;}
Showing 1-5 of 5 results.