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!)
A098383 Define a function f on the positive integers by: if n is 1 or composite, stop; but if n = prime(k) then f(n) = k; a(n) = sum of terms in trajectory of n under repeated application of f. 1
1, 3, 6, 4, 11, 6, 11, 8, 9, 10, 22, 12, 19, 14, 15, 16, 28, 18, 27, 20, 21, 22, 32, 24, 25, 26, 27, 28, 39, 30, 53, 32, 33, 34, 35, 36, 49, 38, 39, 40, 60, 42, 57, 44, 45, 46, 62, 48, 49, 50, 51, 52, 69, 54, 55, 56, 57, 58, 87, 60, 79, 62, 63, 64, 65, 66, 94, 68, 69, 70, 91, 72 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Sum of the terms in the prime index chain for n (cf. A049076).
LINKS
N. Fernandez, An order of primeness [cached copy, included with permission of the author]
EXAMPLE
a(2) = 3 because 2 is the first prime, therefore 2 + 1 = 3. a(3) = 6 because 3 is the second prime and two is the first prime, therefore 3 + 2 + 1 = 6. a(4) = 4 because 4 is composite. a(5) = 11 because five is the third prime, three is the second prime and two is the first prime, which gives us 5 + 3 + 2 + 1 = 11 and so on.
MAPLE
a:= n-> n + `if`(isprime(n), a(numtheory[pi](n)), 0):
seq (a(n), n=1..80); # Alois P. Heinz, Jul 16 2012
MATHEMATICA
Table[s=n; p=n; While[PrimeQ[p], p=PrimePi[p]; s=s+p]; s, {n, 1000}] (T. D. Noe)
CROSSREFS
Sequence in context: A122634 A169846 A169854 * A328637 A162523 A292681
KEYWORD
easy,nonn
AUTHOR
Andrew S. Plewe, Oct 26 2004
EXTENSIONS
More terms from Ray Chandler, Nov 04 2004
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 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)