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.

A090083 Even pseudoprimes to base 9.

Original entry on oeis.org

4, 8, 28, 52, 286, 364, 532, 616, 946, 1036, 1288, 2806, 2926, 3052, 4376, 4636, 5356, 6364, 8744, 8866, 11476, 12124, 15964, 17446, 19096, 19684, 21196, 21736, 24046, 24388, 26596, 31876
Offset: 1

Views

Author

Labos Elemer, Nov 25 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Do[s=Mod[ -1+9^(n-1), n]; If[Equal[s, 0]&&!PrimeQ[n]&&EvenQ[n], Print[n]], {n, 1, 1000000}]
  • PARI
    is(n)=Mod(9, n)^(n-1)==1&&!isprime(n)&&n%2==0 \\ Charles R Greathouse IV, Apr 12 2012
    
  • PARI
    p=2; forprime(q=3, 1e8, forstep(n=p+1, q-1, 2, if(Mod(9, n)^(n-1)==1, print1(n", "))); p=q) \\ Charles R Greathouse IV, Apr 12 2012

A020235 Strong pseudoprimes to base 9.

Original entry on oeis.org

91, 121, 671, 703, 1541, 1729, 1891, 2821, 3281, 3367, 3751, 5551, 7381, 8401, 8911, 10585, 11011, 12403, 14383, 15203, 16471, 16531, 18721, 19345, 23521, 24661, 24727, 28009, 29341, 30857, 31621, 32791, 38503, 44287, 46999, 47197, 49051, 49141, 53131
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A020138, A020229 (base 3), A020307 (base 81).

A262154 Pseudoprimes to base 9, written in base 9.

Original entry on oeis.org

4, 8, 31, 57, 111, 144, 247, 347, 444, 627, 651, 754, 825, 854, 861, 1261, 1264, 1371, 1457, 1681, 1811, 2102, 2331, 2531, 3338, 3378, 3581, 3631, 3757, 3774, 4011, 4161, 4445, 4551, 5127, 6002, 6321, 6722, 7311, 7547, 8651, 10044, 10101, 10637, 11111, 11762, 12464, 12831, 12885, 13141, 13201, 15461, 16084, 16451
Offset: 1

Views

Author

Abdul Gaffar Khan, Sep 13 2015

Keywords

Crossrefs

Cf. A007095 (numbers in base 9), A020138 (pseudoprimes to base 9).

Programs

  • Mathematica
    base = 9; t = {}; n = 1;
    While[Length[t] < 80, n++;
    If[! PrimeQ[n] && PowerMod[base, n - 1, n] == 1,
      AppendTo[t, FromDigits@IntegerDigits[n, 9]]]]; t
  • PARI
    lista(nn, b=9) = {for (n=1, nn, if (Mod(b, n)^(n-1)==1 && !ispseudoprime(n) && n>1, print1(subst(Pol(digits(n,b), x), x, 10), ", ");););} \\ Michel Marcus, Sep 30 2015

Formula

a(n) = A007095(A020138(n)).

A122786 Nonprimes n such that 9^n == 9 (mod n).

Original entry on oeis.org

1, 4, 6, 8, 9, 12, 15, 18, 24, 28, 36, 45, 52, 66, 72, 91, 121, 153, 205, 276, 286, 364, 366, 369, 396, 435, 511, 532, 561, 616, 671, 697, 703, 726, 804, 946, 949, 1035, 1036, 1105, 1128, 1288, 1387, 1541, 1729, 1737, 1845, 1854, 1891, 2196, 2465, 2501, 2556, 2665
Offset: 1

Views

Author

Farideh Firoozbakht, Sep 12 2006

Keywords

Comments

Theorem: If both numbers q and 2q-1 are primes and n=q*(2q-1) then 9^n==9 (mod n) (n is in the sequence). So A005382*(2*A005382-1)= 6,15,91,703,1891,2701,12403,18721,... is the related subsequence. A020138 is a subsequence of this sequence.

Crossrefs

Programs

  • Maple
    q:= n-> is(not isprime(n) and (9 &^ n mod n) = (9 mod n)):
    select(q, [$1..3000])[];  # Alois P. Heinz, Mar 06 2019
  • Mathematica
    Select[Range[4000], ! PrimeQ[ # ] && Mod[9^#, # ] == Mod[9, # ] &]
    Join[{1,4,6,8,9},Select[Range[3000],CompositeQ[#]&&PowerMod[9,#,#]==9&]] (* Harvey P. Dale, Jul 17 2014 *)
  • PARI
    isok(n) = !isprime(n) && (Mod(9,n)^n == Mod(9, n)); \\ Michel Marcus, Mar 06 2019

A306448 Pseudoprimes to base 9 that are not squarefree.

Original entry on oeis.org

4, 8, 28, 52, 121, 364, 532, 616, 1036, 1288, 3052, 3751, 4376, 4636, 4961, 5356, 6364, 7381, 8744, 11011, 11476, 12124, 15964, 19096, 19684, 21196, 21736, 24388, 26596, 29161, 31876, 32791, 37576, 40132, 45676, 47972, 53092, 61831, 67276, 72136, 80476, 80956, 86296
Offset: 1

Views

Author

Jianing Song, Feb 16 2019

Keywords

Comments

Numbers k that are not squarefree and satisfy 9^(k-1) == 1 (mod k).
Any term is divisible by the square of a base-9 Wieferich prime ({2} U {base-3 Wieferich primes} = {2} U A014127 = {2, 11, 1006003, ...}).
Intersection of A020138 and A013929.

Crossrefs

Pseudoprimes to base b that are not squarefree: A158358 (b=2), A244065 (b=3), A243010 (b=5), A243089 (b=7), A243090 (b=8), this sequence (b=9), A306449 (b=10).
Cf. also A014127, A020138, A013929.

Programs

  • PARI
    for(n=1, 10^5, if(Mod(9, n)^(n-1)==1 && !issquarefree(n), print1(n, ", ")))

A371729 The number of pseudoprimes to base n that are smaller than n.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 2, 1, 1, 0, 3, 0, 1, 1, 4, 0, 4, 0, 3, 1, 1, 0, 5, 3, 1, 2, 5, 0, 4, 1, 4, 3, 2, 1, 7, 0, 1, 1, 8, 0, 6, 2, 3, 3, 1, 0, 9, 2, 3, 1, 8, 0, 6, 3, 6, 1, 2, 0, 9, 3, 1, 7, 7, 1, 6, 2, 4, 1, 9, 0, 11, 2, 1, 7, 6, 1, 7, 3, 10, 5, 3, 0, 8, 4, 1, 1
Offset: 2

Views

Author

Amiram Eldar, Apr 05 2024

Keywords

Examples

			a(2) = 0 since the smallest pseudoprime to base 2 (A001567) is 341 which is larger than 2.
a(5) = 1 since there is one pseudoprime to base 5 (A005936) that is smaller than 5: 4.
a(9) = 2 since there are 2 pseudoprimes to base 9 (A020138) that are smaller than 9: 4 and 8.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Count[Range[4, n-1], _?(CompositeQ[#] && PowerMod[n, # - 1, #] == 1 &)]; Array[a, 100, 2]
  • PARI
    a(n) = {my(c = 0); forcomposite(k = 4, n-1, if(Mod(n, k)^(k-1) == 1, c++)); c;}

Formula

a(n) = 0 if and only if A090086(n) > n, or equivalently, n-1 is in A316504.

A263239 Euler pseudoprimes to base 9: composite integers such that abs(9^((n - 1)/2)) == 1 mod n.

Original entry on oeis.org

4, 28, 91, 121, 286, 532, 671, 703, 949, 1036, 1105, 1541, 1729, 1891, 2465, 2665, 2701, 2821, 3281, 3367, 3751, 4636, 4961, 5551, 6364, 6601, 7381, 8401, 8911, 10585, 11011, 11476, 12403, 14383, 15203, 15457, 15841, 16471, 16531, 18721, 19345, 19684, 23521, 24046, 24661, 24727
Offset: 1

Views

Author

Daniel Lignon, Oct 12 2015

Keywords

Comments

Even numbers are permitted since 9 is an integer square. - Charles R Greathouse IV, Oct 12 2015

Crossrefs

Cf. A020138 (pseudoprimes to base 9).
Cf. A006970 (base 2), A262051 (base 3), A262052 (base 5), A262053 (base 6), A262054 (base 7), A262055 (base 8).

Programs

  • Mathematica
    eulerPseudo9Q[n_]:=(Mod[9^((n-1)/2)+1,n]==0 ||Mod[9^((n-1)/2)-1,n]==0) && Not[PrimeQ[n]];
    Select[Range[2,200000],eulerPseudo9Q]
  • PARI
    is(n) = abs(centerlift(Mod(3, n)^(n-1)))==1 && !isprime(n) && n>1 \\ Charles R Greathouse IV, Oct 12 2015

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