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.

A120804 Primes with consecutive digits descending.

This page as a plain text file.
%I A120804 #12 Aug 05 2022 15:35:03
%S A120804 2,3,5,7,43,109,10987,76543,10987654321098765432109876543210987,
%T A120804 4321098765432109876543210987654321098765432109876543210987654321
%N A120804 Primes with consecutive digits descending.
%C A120804 Digits can be in descending order. After 0 comes 9.
%C A120804 a(15) has 1053 digits. - _Michael S. Branicky_, Aug 05 2022
%H A120804 Paul Tek, <a href="/A120804/b120804.txt">Table of n, a(n) for n = 1..14</a>
%t A120804 f[n_] := Block[{d = Reverse@ Range@n, t = Table[1, {n}]}, Select[ Drop[ Union@ Flatten@ Table[ FromDigits[ Mod[d + i*t, 10]], {i, 10}], 2], PrimeQ@# &]]; Array[f, 1000] // Flatten
%o A120804 (Python)
%o A120804 from sympy import isprime
%o A120804 from itertools import count, islice
%o A120804 def bgen(): yield from (int("".join(str((s0-i)%10) for i in range(d))) for d in count(1) for s0 in range(1, 10))
%o A120804 def agen(): yield from filter(isprime, bgen())
%o A120804 print(list(islice(agen(), 10))) # _Michael S. Branicky_, Aug 05 2022
%Y A120804 Cf. A006055, A120805.
%K A120804 nonn,base
%O A120804 1,1
%A A120804 _Robert G. Wilson v_, Jul 05 2006
%E A120804 Corrected by _Paul Tek_, May 08 2013