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

A098651 Where A098650 reaches a record.

Original entry on oeis.org

1, 2, 6, 15, 30, 39, 78, 105, 910, 7735, 18655, 98605, 214415, 265031, 283309, 313937, 373395, 432419, 440115, 441285, 497211, 573287, 658502, 1035741, 1198806
Offset: 1

Views

Author

Robert G. Wilson v, Sep 18 2004

Keywords

Crossrefs

Programs

  • Mathematica
    PrimeFactors[n_] := Flatten[ Table[ # [[1]], {1} ] & /@ FactorInteger[ n ]]; f[n_] := Block[{k = n + 1}, If[EvenQ[k], k++ ]; While[ PrimeQ[k] || Union[ PowerMod[ PrimeFactors[n], k - 1, k]] != {1}, k += 2]; k]; a = {1}; b = {9}; Do[ If[ SquareFreeQ[n], c = f[n]; If[c > b[[ -1]], AppendTo[a, n]; AppendTo[b, c]; Print[n]]], {n, 2, 145000}]; a

Extensions

a(13)-a(25) from Amiram Eldar, Jul 07 2021

A098652 Records in A098650.

Original entry on oeis.org

9, 341, 1105, 1541, 1729, 1891, 2465, 29341, 162401, 252601, 294409, 334153, 340561, 399001, 410041, 488881, 530881, 636641, 954271, 1024651, 1152271, 1193221, 1461241, 1615681, 1857241
Offset: 1

Views

Author

Robert G. Wilson v, Sep 18 2004

Keywords

Crossrefs

Programs

  • Mathematica
    PrimeFactors[n_] := Flatten[ Table[ # [[1]], {1} ] & /@ FactorInteger[ n ]]; f[n_] := Block[{k = n + 1}, If[EvenQ[k], k++ ]; While[ PrimeQ[k] || Union[ PowerMod[ PrimeFactors[n], k - 1, k]] != {1}, k += 2]; k]; a = {1}; b = {9}; Do[ If[ SquareFreeQ[n], c = f[n]; If[c > b[[ -1]], AppendTo[a, n]; AppendTo[b, c]; Print[n]]], {n, 2, 145000}]; b

Extensions

a(13)-a(25) from Amiram Eldar, Jul 07 2021

A250199 Smallest pseudoprime (>prime(n)) to base prime(n).

Original entry on oeis.org

341, 91, 124, 25, 15, 21, 45, 45, 33, 35, 49, 45, 105, 77, 65, 65, 87, 91, 85, 105, 111, 91, 105, 99, 105, 175, 133, 133, 117, 133, 153, 143, 148, 161, 175, 175, 186, 186, 231, 205, 185, 195, 217, 276, 231, 225, 217, 231, 285, 285, 259, 255, 363, 289, 301, 341, 286, 341, 322, 329
Offset: 1

Views

Author

Eric Chen, Feb 21 2015

Keywords

Comments

Subsequence of A007535, see formula.

Examples

			a(7) = 45 because the 7th prime is 17, and the smallest pseudoprime (> 17) to base 17 is 45.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{b = Prime[n], k = Prime[n] + 1}, While[PrimeQ[k] || PowerMod[b, k - 1, k] != 1, k++]; k]; Array[f, 60]
  • PARI
    a(n) = for(k=prime(n)+1,2^24,if(Mod(prime(n),k)^(k-1)==Mod(1,k) && !isprime(k),return(k)))

Formula

a(n) = A007535(A000040(n)).

A247906 a(n) = n-th pseudoprime to base n.

Original entry on oeis.org

561, 286, 341, 781, 1105, 1105, 133, 364, 703, 793, 1105, 1099, 1891, 6541, 1271, 3991, 1649, 1849, 3059, 7363, 2047, 1738, 4537, 1128, 3145, 2993, 5365, 4069, 4097, 7421, 2465, 11305, 2937, 16589, 4495, 2044, 6601, 26885, 13073, 6892, 22945, 3885, 8695, 10879
Offset: 2

Views

Author

Felix Fröhlich, Sep 26 2014

Keywords

Examples

			a(2) = A001567(2) = 561.
a(3) = A005935(3) = 286.
		

Crossrefs

Cf. Pseudoprimes to base b: A001567 (b=2), A005935 (b=3), A020136 (b=4), A005936 (b=5), A005937 (b=6), A005938 (b=7), A020137 (b=8), A020138 (b=9).

Programs

  • PARI
    for(n=2, 20, i=0; forcomposite(c=2, 1e9, if(Mod(n, c)^(c-1)==1, i++; if(i==n, print1(c, ", "); i=0; break({1}))); if(c==1e9, print1(">1e9, "))))
Showing 1-4 of 4 results.