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!)
A178344 a(n) = Sum_i prime(i+1)^b(i) where n = Sum_{i>=0} b(i)*2^e(i) is the binary representation of n. 3

%I #16 Feb 19 2019 23:14:42

%S 1,2,4,5,7,8,9,10,10,11,12,13,14,15,16,17,15,16,17,18,19,20,21,22,21,

%T 22,23,24,25,26,27,28,18,19,20,21,22,23,24,25,24,25,26,27,28,29,30,31,

%U 28,29,30,31,32,33,34,35,34,35,36,37,38,39,40,41,23,24,25,26,27,28,29,30,29,30

%N a(n) = Sum_i prime(i+1)^b(i) where n = Sum_{i>=0} b(i)*2^e(i) is the binary representation of n.

%C a(0) = 0 might be a more logical value for the initial term. - _Antti Karttunen_, Sep 28 2018

%H Antti Karttunen, <a href="/A178344/b178344.txt">Table of n, a(n) for n = 0..65537</a>

%F For n >= 1, a(n) = A089625(n) + A080791(n). - _Antti Karttunen_, Sep 28 2018

%e a(16)=15 because 10000 is the base-2 representation of n=16 and 11^1 + 7^0 + 5^0 + 3^0 + 2^0 = 15.

%p A178344 := proc(n)

%p if n = 0 then

%p dgs := [0] ;

%p else

%p dgs := convert(n,base,2) ;

%p end if;

%p add(ithprime(i)^dgs[i],i=1..nops(dgs)) ;

%p end proc:

%p seq(A178344(n),n=0..73) ; # _R. J. Mathar_, Sep 28 2018

%t Array[Total@ MapIndexed[Prime[First@ #2]^#1 &, Reverse@ IntegerDigits[#, 2]] &, 74, 0] (* _Michael De Vlieger_, Feb 19 2019 *)

%o (PARI) a(n) = my(b=Vecrev(binary(n))); if (n==0, b=[0]); sum(i=1, #b, prime(i)^b[i]); \\ _Michel Marcus_, Sep 29 2018

%Y Cf. A000040, A001477, A056791, A007088, A080791, A089625, A143710, A175524.

%Y Cf. A178562 (first differences).

%K nonn,base

%O 0,2

%A _Juri-Stepan Gerasimov_, May 25 2010, Jan 06 2010

%E Offset modified, keyword:base added by _R. J. Mathar_, May 28 2010

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 06:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)