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!)
A113580 Define prime(0) = 1; then a(n) = sum prime(d), where d ranges over the decimal digits of n. 2

%I #11 Dec 05 2013 19:57:07

%S 1,2,3,5,7,11,13,17,19,23,3,4,5,7,9,13,15,19,21,25,4,5,6,8,10,14,16,

%T 20,22,26,6,7,8,10,12,16,18,22,24,28,8,9,10,12,14,18,20,24,26,30,12,

%U 13,14,16,18,22,24,28,30,34,14,15,16,18,20,24,26,30,32,36,18,19,20,22,24,28

%N Define prime(0) = 1; then a(n) = sum prime(d), where d ranges over the decimal digits of n.

%H Vincenzo Librandi, <a href="/A113580/b113580.txt">Table of n, a(n) for n = 0..1000</a>

%e a(123) = prime(1) + prime(2) + prime(3) = 2 + 3 + 5 = 10.

%e a(10001) = 2 + 1 + 1 + 1 + 2 = 7.

%t f[n_] := Plus @@ (IntegerDigits[n] /. {0 -> 1, 1 -> 2, 2 -> 3, 3 -> 5, 4 -> 7, 5 -> 11, 6 -> 13, 7 -> 17, 8 -> 19, 9 -> 23}); Table[ f[n], {n, 0, 75}] (* _Robert G. Wilson v_ *)

%Y Cf. A113581; first occurrence in A113736.

%K nonn,base

%O 0,2

%A _Amarnath Murthy_, Nov 06 2005

%E More terms from _Robert G. Wilson v_, Nov 08 2005

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