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!)
A249900 Sequence which reappears when consecutive terms are erased iff they both are either prime or nonprime. 2
1, 2, 3, 4, 6, 2, 8, 9, 3, 4, 5, 7, 6, 2, 8, 11, 13, 9, 3, 4, 5, 10, 12, 7, 6, 2, 8, 11, 14, 15, 13, 9, 3, 4, 5, 10, 17, 19, 12, 7, 6, 2, 8, 11, 14, 23, 29, 15, 13, 9, 3, 4, 5, 10, 17, 16, 18, 19, 12, 7, 6, 2, 8, 11, 14, 23, 20, 21, 29, 15, 13, 9, 3, 4, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
Éric Angelini, More fractal triangles (with primes), SeqFan list, Jan 12 2015.
EXAMPLE
. n : 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|
. a(n): 1 2 3 4 6 2 8 9 3 4 5 7 6 2 8 11 13 9 3 4 5 10 12 7 6
. p/c : - p p c c p c c p c p p c p c p p c p c p c c p c
. : 1 _ _ _ _ 2 _ _ 3 4 _ _ 6 2 8 _ _ 9 3 4 5 _ _ 7 6 .
PROG
(Haskell)
a249900 n = a249900_list !! n
a249900_list = [1..4] ++ concatMap (uncurry (++))
(f [2] [3, 4] (drop 2 a000040_list) (tail a002808_list)) where
f us@(u:_) vs ps'@(p:p':ps) cs'@(c:c':cs)
| a010051 u == 1 = g ([c] ++ us ++ [c']) vs ps' cs
| otherwise = g ([p] ++ us ++ [p']) vs ps cs'
g us vs@(v:_) (p:ps) (c:cs) = (us, ws) : f us ws ps cs where
ws = if a010051 v == 1 then [c] ++ vs ++ [p] else [p] ++ vs ++ [c]
CROSSREFS
Sequence in context: A030378 A280244 A203138 * A260272 A321479 A128332
KEYWORD
nonn
AUTHOR
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 17 20:27 EDT 2024. Contains 371767 sequences. (Running on oeis4.)