|
|
A258437
|
|
Smallest number m such that A062234(m) = A062234(m-1+k) for k = 1..n.
|
|
7
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
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)
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
---+--------+----------------------+--------------------------
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 ___ ]
|
|
PROG
|
(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, ", "); ); }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|