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.

A258437 Smallest number m such that A062234(m) = A062234(m-1+k) for k = 1..n.

Original entry on oeis.org

9, 1, 302, 332, 465460, 67928439
Offset: 1

Views

Author

Reinhard Zumkeller, May 31 2015

Keywords

Comments

From Michel Marcus, Feb 09 2022: (Start)
Previous name: "Smallest number m such that A258383(m) = n" was not ok. For instance, for a(1) the smallest m such that A258383(m)=1 is 5, then we have to sum up the first 5 terms 2+2+2+2+1 to get 9, as shown in the example table (whose 2nd and 3rd column names I edited too).
Note that prime([302, 332, 465460]) = [1997, 2237, 6824897] which is a subsequence of A090807. Then one can verify that primepi(1356705137 = A090807(7)) = 67928439 and primepi(3637803390827 = A090807(8)) = 130463972798 are good candidates for a(6) and a(7). a(6) has been confirmed by program. (End)

Examples

			   n |   f(n) | a(n) = A258432(f(n)) |     Run in A062234
  ---+--------+----------------------+--------------------------
   1 |      5 |       9 = A258469(1) | [17]
   2 |      1 |       1 = A257762(1) | [1, 1]
   3 |    265 |     302 = A258449(1) | [1995, 1995, 1995]
   4 |    290 |     332 = A257892(1) | [2235, 2235, 2235, 2235]
   5 | 440676 |  465460 = A257951(1) | [ ___ 5 x 6824895 ___ ]
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a258437 = (+ 1) . fromJust . (`elemIndex` a258383_list)
    
  • PARI
    f(n) = 2*prime(n) - prime(n+1); \\ A062234
    lista(nn) = {my(vp=primes(nn)); my(v=vector(nn-1, k, 2*vp[k] - vp[k+1]), last=v[1], nb=1, list=List()); kill(vp); for (n=2, nn-1, if (v[n]==last, nb++, listput(list, nb); last=v[n]; nb=1);); Vec(list);} \\ A258383
    find(k, v) = {my(i=1); while (v[i] != k, i++); i;}
    listr(nn) = {my(v=lista(nn)); for (k=1, 6, my(pos = find(k, v)); print1(sum(i=1, pos, v[i])- k + 1, ", "););}
    listr(9*10^7) \\ Michel Marcus, Feb 09 2022

Formula

A258383(a(n)) = n and A258383(m) != n for m < a(n);
let m = A258432(a(n)): A062234(m) = A062234(m-1+k) for k = 1..n.

Extensions

New name and a(6) from Michel Marcus, Feb 09 2022