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.

A262104 Pseudoprimes to base 7, written in base 7.

Original entry on oeis.org

6, 34, 643, 1431, 2023, 2245, 3136, 5215, 6061, 6601, 10121, 12361, 16123, 20032, 25345, 33155, 41545, 42601, 42652, 44122, 45406, 50026, 54561, 56035, 66522, 66666, 105403, 110254, 112612, 113345, 113356, 123616, 135206, 140011, 151142, 151354, 153022, 153101, 153352, 155554
Offset: 1

Views

Author

Abdul Gaffar Khan, Sep 11 2015

Keywords

Crossrefs

Cf. A005938 (pseudoprimes to base 7), A007093 (numbers in base 7).

Programs

  • Mathematica
    base = 7; t = {}; n = 1;
    While[Length[t] < 40, n++;
    If[! PrimeQ[n] && PowerMod[base, n - 1, n] == 1,
      AppendTo[t, FromDigits@IntegerDigits[n, 7]]]]; t
    FromDigits[IntegerDigits[#,7]]&/@Select[Range[40000],CompositeQ[#] && PowerMod[ 7,#-1,#]==1&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 24 2018 *)
  • PARI
    lista(nn, b=7) = {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) = A007093(A005938(n)).