Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A107450
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A107450 Additive persistence of the prime numbers. +0
1
0, 0, 0, 0, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 1, 2, 1, 2, 2 (list; graph; listen)
OFFSET

1,8

EXAMPLE

29 -> 2 + 9 = 11 -> 1 + 1 = 2 -> persistence = 2

487 -> 4 + 8 + 7 = 19 -> 1 + 9 = 10 -> 1 + 0 = 1 -> persistence = 3

MAPLE

P:=proc(n) local i, k, w, ok, cont; for i from 1 by 1 to n do k:=ithprime(i); w:=0; ok:=1; if k<10 then print(0); else cont:=1; while ok=1 do while k>0 do w:=w+(k-(trunc(k/10)*10)); k:=trunc(k/10); od; if w<10 then ok:=0; print(cont); else cont:=cont+1; k:=w; w:=1; fi; od; fi; od; end: P(100);

CROSSREFS

Cf. A129985.

Sequence in context: A100387 A081129 A022934 this_sequence A104248 A069349 A167404

Adjacent sequences: A107447 A107448 A107449 this_sequence A107451 A107452 A107453

KEYWORD

base,easy,nonn

AUTHOR

Paolo P. Lava & Giorgio Balzarotti (ppl(AT)spl.at), Jun 22 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research