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.

A335337 a(n) is the least k such that A335294(k) = n, or -1 if no such k exists.

Original entry on oeis.org

4, 1, 13, 229, 3259, 15739, 449569, 6958841, 130259903, 2404517671, 56014949761, 538155413969
Offset: 0

Views

Author

Altug Alkan, Jun 02 2020

Keywords

Comments

Conjecture: a(n) > 0 for all n.

Crossrefs

Cf. A335294.

Programs

  • Mathematica
    upto[nn_] := Block[{A = <|1->1|>, v, i=0, is=0, sp=2, p=2, s=1}, Print@{1, 1}; Do[ If[n == p, i++; p = NextPrime@ p]; v = i-is; If[! KeyExistsQ[A, v], A[v] = n; Print[{n, v}]]; s += v; While[s >= sp, is++; sp = NextPrime@ sp], {n, 2, nn}]; Last /@ Sort@ Normal@ A]; upto[450000] (* Giovanni Resta, Jun 02 2020 *)
  • PARI
    a(n) = { my (pn=0, ps=0, s=0, v); for (k=1, oo, pn+=isprime(k); v=if (k==1, 1, pn - ps); if (v==n, return (k)); ps+=sum(k=s+1, s+=v, isprime(k))) } \\ Rémy Sigrist, Jun 02 2020

Extensions

a(7)-a(11) from Giovanni Resta, Jun 02 2020