login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A112279
a(1)=1; a(n)=prime(mod(a(n-1),100)).
2
1, 2, 3, 5, 11, 31, 127, 103, 5, 11, 31, 127, 103, 5, 11, 31, 127, 103, 5, 11, 31, 127, 103, 5, 11, 31, 127, 103, 5, 11, 31, 127, 103, 5, 11, 31, 127, 103, 5, 11, 31, 127, 103, 5, 11, 31, 127, 103, 5, 11, 31, 127, 103, 5, 11, 31, 127, 103, 5, 11, 31, 127, 103, 5, 11, 31, 127
OFFSET
1,2
COMMENTS
Starting with the third term, cycles every five terms. - Robert G. Wilson v, Dec 13 2005
REFERENCES
Zak Seidov, Posting to Seq Fan mailing list, Nov 28 2005
FORMULA
G.f.: x*(-100*x^7 - 125*x^6 - 30*x^5 - 11*x^4 - 5*x^3 - 3*x^2 - 2*x - 1)/(x^5 - 1). - Chai Wah Wu, Sep 26 2019
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Prime[Mod[a[n - 1], 100]], Table[ a[n], {n, 1, 66}] (* Robert G. Wilson v *)
NestList[Prime[Mod[#, 100]]&, 1, 80] (* or *) PadRight[{1, 2, 3}, 100, {31, 127, 103, 5, 11}] (* Harvey P. Dale, May 01 2023 *)
PROG
(Magma) [n le 1 select 1 else NthPrime(Self(n-1) mod 100):n in [1..75]]; // Marius A. Burtea, Sep 26 2019
CROSSREFS
Sequence in context: A079557 A090709 A357220 * A130166 A007097 A173422
KEYWORD
nonn,less
AUTHOR
N. J. A. Sloane, Nov 24 2005
EXTENSIONS
More terms from Robert G. Wilson v, Dec 13 2005
Offset corrected by N. J. A. Sloane, Dec 10 2014 at the suggestion of Zak Seidov.
STATUS
approved