This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A089625 Replace 2^k in binary expansion of n with (k+1)-st prime. 10
 2, 3, 5, 5, 7, 8, 10, 7, 9, 10, 12, 12, 14, 15, 17, 11, 13, 14, 16, 16, 18, 19, 21, 18, 20, 21, 23, 23, 25, 26, 28, 13, 15, 16, 18, 18, 20, 21, 23, 20, 22, 23, 25, 25, 27, 28, 30, 24, 26, 27, 29, 29, 31, 32, 34, 31, 33, 34, 36, 36, 38, 39, 41, 17, 19, 20, 22, 22, 24, 25, 27 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS a(A000079(n)) = A000040(n+1); a(A000225(n)) = A007504(n); A000586(n) > 0 iff n = a(m) for some m; a(n) = n for n = 9, 10, or 12. LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 Eric Weisstein's World of Mathematics, Binary Eric Weisstein's World of Mathematics, Prime Partition. FORMULA a(n) = Sum(b(i)*p(i+1):0<=i=0, prime(k+1)*x^2^k/(1+x^2^k)]. a(n) = Sum_k>=0 {A030308(n,k)*A000040(k+1)}. - Philippe Deléham, Oct 15 2011 log n log log n  << a(n) << log^2 n log log n. - Charles R Greathouse IV, Sep 23 2012 For n >= 8, a(n) <= m*(m+1)*(log(m)+log(log(m)))/2 where m = ceil(log_2(n)). - Robert Israel, Jun 08 2015 EXAMPLE n=25 -> '11001': a(25) = 1*11 + 1*7 + 0*5 + 0*3 + 1*2 = 20. This sequence regarded as a triangle with rows of lengths  1, 2, 4, 8, 16, ...: 2 3, 5 5, 7, 8, 10 7, 9, 10, 12, 12, 14, 15, 17 11, 13, 14, 16, 16, 18, 19, 21, 18, 20, 21, 23, 23, 25, 26, 28 13, ... - Philippe Deléham, Jun 07 2015 MAPLE f:= proc(n) local L, j;   L:= convert(n, base, 2);   add(L[i]*ithprime(i), i=1..nops(L)) end proc: map(f, [\$1..100]); # Robert Israel, Jun 08 2015 PROG (PARI) a(n)=my(v=Vecrev(binary(n)), s, i); forprime(p=2, prime(#v), s+=v[i++]*p); s \\ Charles R Greathouse IV, Sep 23 2012 (Haskell) a089625 n = f n 0 a000040_list where    f 0 y _      = y    f x y (p:ps) = f x' (y + p * r) ps where (x', r) = divMod x 2 -- Reinhard Zumkeller, Oct 03 2012 CROSSREFS Cf. A007088, A000586, A000009. Other sequences that are built by replacing 2^k in the binary representation with other numbers: A029931 (naturals), A059590 (factorials), A022290 (Fibonacci). Sequence in context: A225636 A023838 A246795 * A092391 A187322 A156899 Adjacent sequences:  A089622 A089623 A089624 * A089626 A089627 A089628 KEYWORD nonn,tabf AUTHOR Reinhard Zumkeller, Dec 31 2003 STATUS approved

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

Last modified September 21 15:13 EDT 2017. Contains 292300 sequences.