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.

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

This page as a plain text file.
%I A194955 #21 Jul 25 2023 04:04:31
%S A194955 2,3,5,7,13,19,31,41,47,67,73,79,89,97,103,113,137,149,157,167,197,
%T A194955 229,239,281,293,313,353,373,379,421,431,487,557,577,601,631,659,709,
%U A194955 719,733,761,859,887,911,953,967,1009,1051,1061,1069,1109,1129,1229,1259,1301
%N A194955 Slowest increasing sequence of primes such that a(1)=2, a(n)-a(n-1) is a multiple of A000120(a(n-1)).
%H A194955 Amiram Eldar, <a href="/A194955/b194955.txt">Table of n, a(n) for n = 1..10000</a>
%p A194955 A000120 := proc(n)
%p A194955         wt(n) ;
%p A194955 end proc:
%p A194955 A194955 := proc(n)
%p A194955         option remember;
%p A194955         local p;
%p A194955         if n = 1 then
%p A194955                 2;
%p A194955         else
%p A194955                 p := nextprime(procname(n-1)) ;
%p A194955                 while (p-procname(n-1)) mod A000120(procname(n-1)) <> 0 do
%p A194955                         p := nextprime(p);
%p A194955                 end do;
%p A194955                 p ;
%p A194955         end if;
%p A194955 end proc:
%p A194955 seq(A194955(n),n=1..80) ; # _R. J. Mathar_, Sep 20 2011
%t A194955 a[1] = 2; a[n_] := a[n] = Module[{k = a[n - 1], s = DigitCount[a[n - 1], 2, 1]}, k += s; While[! PrimeQ[k], k += s]; k]; Array[a, 50] (* _Amiram Eldar_, Jul 25 2023 *)
%Y A194955 Cf. A000120, A194954.
%K A194955 nonn,base
%O A194955 1,1
%A A194955 _Vladimir Shevelev_, Sep 06 2011