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.

A235224 a(0) = 0, and for n > 0, a(n) = largest k such that A002110(k-1) <= n, where A002110(k) gives the k-th primorial number.

Original entry on oeis.org

0, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 05 2014

Keywords

Comments

For n > 0: a(n) = (length of row n in A235168) = A055642(A049345(n)).
For n > 0, a(n) gives the length of primorial base expansion of n. Also, after zero, each value n occurs A061720(n-1) times. - Antti Karttunen, Oct 19 2019

Crossrefs

Programs

  • Haskell
    a235224 n = length $ takeWhile (<= n) a002110_list
    
  • Maple
    A235224 := proc(n)
        local k;
        if n = 0 then
            0;
        else
            for k from 0 do
                if A002110(k-1) > n then
                    return k-1 ;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Apr 19 2021
  • Mathematica
    primorial[n_] := Times @@ Prime[Range[n]];
    a[n_] := TakeWhile[primorial /@ Range[0, n], # <= n &] // Length;
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Oct 27 2021 *)
  • PARI
    A235224(n) = { my(s=0, p=2); while(n, s++; n = n\p; p = nextprime(1+p)); (s); }; \\ Antti Karttunen, Oct 19 2019
    
  • PARI
    A235224(n, p=2) = if(!n,n,if(nA235224(n\p, nextprime(p+1)))); \\ (Recursive implementation) - Antti Karttunen, Oct 19 2019

Formula

From Antti Karttunen, Oct 19 2019: (Start)
a(n) = A061395(A276086(n)).
For all n >= 0, a(n) >= A267263(n).
For all n >= 1, A000040(a(n)) > A328114(n). (End)

Extensions

Name corrected to match the data by Antti Karttunen, Oct 19 2019