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!)
A330356 Starting from n: as long as the decimal representation contains a prime number, replace the largest and leftmost such substring with the index of the corresponding prime number; a(n) corresponds to the final value. 1
0, 1, 1, 1, 4, 1, 6, 4, 8, 9, 10, 1, 1, 6, 14, 6, 16, 4, 18, 8, 10, 1, 1, 9, 14, 9, 16, 14, 18, 10, 10, 1, 1, 9, 14, 9, 16, 1, 18, 10, 40, 6, 6, 14, 44, 14, 46, 6, 48, 49, 10, 1, 1, 16, 14, 9, 16, 14, 18, 4, 60, 18, 18, 18, 64, 18, 66, 8, 68, 69, 40, 10, 6, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
This sequence is a variant of A329428.
LINKS
FORMULA
a(n) <= n with equality iff n belongs to A062115.
a(prime(k)) = a(k) for any k > 0 where prime(k) denotes the k-th prime number.
a(A007097(k)) = 1 for any k >= 0.
EXAMPLE
For n = 8601:
- let pi = A000720,
- 8601 gives 8 followed by pi(601) = 8110,
- 8110 gives pi(811) followed by 0 = 1410,
- 1410 gives 1 followed by pi(41) followed by 0 = 1130,
- 1130 gives pi(113) followed by 0 = 300,
- 300 gives pi(3) followed by 00 = 200,
- 200 gives pi(2) followed by 00 = 100,
- no prime number appears in 100,
- hence a(8601) = 100.
PROG
(PARI) See Links section.
CROSSREFS
Sequence in context: A000593 A115607 A318876 * A329428 A288469 A076717
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Dec 11 2019
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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)