Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A078970
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A078970 Cycle of the inventory sequence (as in A063850) starting with n consists of prime numbers. +0
5
39, 1319, 211319, 12311319, 41122319, 1431221319, 4114232219, 2431321319, 2214333119, 2231143319, 2233311419, 2233311419 (list; graph; listen)
OFFSET

1,1

COMMENT

It can be proved that any inventory sequence ends in a cycle all of whose terms are <= 10^20.

LINKS

Carlos Rivera, The Inventory Sequences and Self-Inventoried Numbers

EXAMPLE

The inventory sequence starting with 39 is: 39, 1319, 211319, 12311319, 41122319, 1431221319, 4114232219, 2431321319, 2214333119, 2231143319, 2233311419, 2233311419,.... The cycle is 2233311419, 2233311419, .... and 2233311419 is prime.

MATHEMATICA

g[n_] := Module[{seen, r, d, l, i, t}, seen = {}; r = {}; d = IntegerDigits[n]; l = Length[d]; For[i = 1, i <= l, i++, t = d[[i]]; If[ ! MemberQ[seen, t], r = Join[r, IntegerDigits[Count[d, t]]]; r = Join[r, {t}]; seen = Append[seen, t]]]; FromDigits[r]];

pr[n_] := Module[{r, t, p1, p, a}, r = {}; t = g[n]; a = True; While[ ! MemberQ[r, t], r = Append[r, t]; t = g[t]]; r = Append[r, t]; p1 = Flatten[Position[r, t]]; p = PrimeQ[Drop[r, p1[[1]]]]; If[MemberQ[p, False], a = False]; a]; l = {}; For[k = 1, k <= 10^4, k++, If[pr[k], l = Append[l, k]]]

CROSSREFS

Cf. A063850, A078786.

Sequence in context: A028219 A014936 A009729 this_sequence A020303 A097314 A112617

Adjacent sequences: A078967 A078968 A078969 this_sequence A078971 A078972 A078973

KEYWORD

base,nice,nonn

AUTHOR

Joseph L. Pe (joseph_l_pe(AT)hotmail.com), Jan 14 2003

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 29 12:46 EST 2009. Contains 167659 sequences.


AT&T Labs Research