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.

A194954 Slowest increasing sequence of primes such that a(1)=2, a(n)-a(n-1) is multiple of A000120(n-1).

This page as a plain text file.
%I A194954 #23 Jul 25 2023 04:04:27
%S A194954 2,3,5,7,11,13,17,23,29,31,37,43,47,53,59,67,71,73,79,97,101,107,113,
%T A194954 137,139,151,157,173,179,191,199,229,233,239,241,271,277,283,307,311,
%U A194954 313,331,337,349,367,379,383,433,439,457,463,467,479,487,491,521,557
%N A194954 Slowest increasing sequence of primes such that a(1)=2, a(n)-a(n-1) is multiple of A000120(n-1).
%H A194954 Amiram Eldar, <a href="/A194954/b194954.txt">Table of n, a(n) for n = 1..10000</a>
%p A194954 A194954 := proc(n)
%p A194954         option remember;
%p A194954         local p;
%p A194954         if n = 1 then
%p A194954                 2;
%p A194954         else
%p A194954                 p := nextprime(procname(n-1)) ;
%p A194954                 while (p-procname(n-1)) mod A000120(n-1) <> 0 do
%p A194954                         p := nextprime(p);
%p A194954                 end do;
%p A194954                 p ;
%p A194954         end if;
%p A194954 end proc:
%p A194954 seq(A194954(n),n=1..80) ; # _R. J. Mathar_, Sep 20 2011
%t A194954 a[1] = 2; a[n_] := a[n] = Module[{k = a[n - 1], s = DigitCount[n - 1, 2, 1]}, k += s; While[! PrimeQ[k], k += s]; k]; Array[a, 50] (* _Amiram Eldar_, Jul 25 2023 *)
%Y A194954 Cf. A000040, A000120, A194955.
%K A194954 nonn,base
%O A194954 1,1
%A A194954 _Vladimir Shevelev_, Sep 06 2011
%E A194954 Corrected by _R. J. Mathar_, Sep 20 2011