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).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 23, 29, 31, 37, 43, 47, 53, 59, 67, 71, 73, 79, 97, 101, 107, 113, 137, 139, 151, 157, 173, 179, 191, 199, 229, 233, 239, 241, 271, 277, 283, 307, 311, 313, 331, 337, 349, 367, 379, 383, 433, 439, 457, 463, 467, 479, 487, 491, 521, 557
Offset: 1

Views

Author

Vladimir Shevelev, Sep 06 2011

Keywords

Crossrefs

Programs

  • Maple
    A194954 := proc(n)
            option remember;
            local p;
            if n = 1 then
                    2;
            else
                    p := nextprime(procname(n-1)) ;
                    while (p-procname(n-1)) mod A000120(n-1) <> 0 do
                            p := nextprime(p);
                    end do;
                    p ;
            end if;
    end proc:
    seq(A194954(n),n=1..80) ; # R. J. Mathar, Sep 20 2011
  • Mathematica
    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 *)

Extensions

Corrected by R. J. Mathar, Sep 20 2011