login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A259031 Smallest m such that |A259029(m)| = n. 2
3, 1, 16, 192, 768, 3072, 12288, 49152, 196608, 786432, 3145728, 12582912, 50331648, 201326592, 805306368, 3221225472, 12884901888, 51539607552 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
|A259029(a(n))| = n and |A259029(m)| != n for m < a(n).
LINKS
EXAMPLE
. n | a(n) | A259029(a(n)) | A259024(a(n))
. ----+------------------------+---------------+--------------
. 0 | 3 | 3*2^0 | 0 | -1
. 1 | 1 | 2^0 | 1 | 1
. 2 | 16 | 2^4 | 2 | 1
. 3 | 192 | 3*2^6 | -3 | -1
. 4 | 768 | 3*2^8 | -4 | -1
. 5 | 3072 | 3*2^10 | -5 | -1
. 6 | 12288 | 3*2^12 | -6 | -1
. 7 | 49152 | 3*2^14 | -7 | -1
. 8 | 196608 | 3*2^16 | -8 | -1
. 9 | 786432 | 3*2^18 | -9 | -1
. 10 | 3145728 | 3*2^20 | -10 | -1
. 11 | 12582912 | 3*2^22 | -11 | -1
. 12 | 50331648 | 3*2^24 | -12 | -1
. 13 | 201326592 | 3*2^26 | -13 | -1
. 14 | 805306368 | 3*2^28 | -14 | -1
. 15 | 3221225472 | 3*2^30 | -15 | -1
. 16 | 12884901888 | 3*2^32 | -16 | -1
. 17 | 51539607552 | 3*2^34 | -17 | -1 .
PROG
(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a259031 = (+ 1) . fromJust . (`elemIndex` (map abs a259029_list))
(PARI) g(n) = {my(f = factor(n), p, e); prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; if(p == 2, (1 + (-1)^e)/2, if(p==3, if(e==1, -1, 0), if(p%6 == 1, 1, (-1)^e)))); } \\ A259029
lista(len) = {my(v=vector(len), s=0, t, k=1, c=0); while(c < len, s += g(k); t = abs(s)+1; if(t <= len && v[t] == 0, c++; v[t] = k); k++); v} \\ Amiram Eldar, Sep 02 2023
CROSSREFS
Sequence in context: A288265 A096611 A176666 * A259686 A350079 A162313
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jun 17 2015
EXTENSIONS
a(12)-a(17) from Amiram Eldar, Sep 02 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)