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.

A089787 a(4n-3), a(4n-2), a(4n-1), and a(4n) are the units digit of the n-th prime followed by 1, 3, 7, and 9 respectively.

This page as a plain text file.
%I A089787 #20 Dec 18 2022 01:41:30
%S A089787 21,23,27,29,31,33,37,39,51,53,57,59,71,73,77,79,11,13,17,19,31,33,37,
%T A089787 39,71,73,77,79,91,93,97,99,31,33,37,39,91,93,97,99,11,13,17,19,71,73,
%U A089787 77,79,11,13,17,19,31,33,37,39,71,73,77,79,31,33,37,39,91,93,97,99,11
%N A089787 a(4n-3), a(4n-2), a(4n-1), and a(4n) are the units digit of the n-th prime followed by 1, 3, 7, and 9 respectively.
%H A089787 Harvey P. Dale, <a href="/A089787/b089787.txt">Table of n, a(n) for n = 1..1000</a>
%F A089787 a(n) = 5+(-1)^n+3*cos(n*Pi/2)-3*sin(n*Pi/2)+10*(prime(floor((n+3)/4)) mod 10). - _Wesley Ivan Hurt_, May 06 2021
%t A089787 Flatten[Table[Mod[Prime[n], 10]*10+{1, 3, 7, 9}, {n, 1, 50}]]
%t A089787 a[n_] := Mod[Prime[Floor[(n + 3)/4]], 10]*10 + {1, 3, 7,
%t A089787 9}[[Mod[n - 1, 4] + 1]] (* _Charles R Greathouse IV_, Jan 02 2013 *)
%t A089787 Table[10*Mod[Prime[n],10]+{1,3,7,9},{n,30}]//Flatten (* _Harvey P. Dale_, Aug 24 2019 *)
%o A089787 (PARI) a(n)=prime((n+3)\4)%10*10+[9,1,3,7][n%4+1] \\ _Charles R Greathouse IV_, Jan 02 2013
%Y A089787 Cf. A007652, A131712.
%Y A089787 Cf. A089784 (essentially the same).
%K A089787 nonn,easy,less
%O A089787 1,1
%A A089787 _Roger L. Bagula_, Jan 09 2004