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