Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A069754
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A069754 Counts transitions between prime and composite to reach the number n. +0
5
0, 1, 1, 2, 3, 4, 5, 6, 6, 6, 7, 8, 9, 10, 10, 10, 11, 12, 13, 14, 14, 14, 15, 16, 16, 16, 16, 16, 17, 18, 19, 20, 20, 20, 20, 20, 21, 22, 22, 22, 23, 24, 25, 26, 26, 26, 27, 28, 28, 28, 28, 28, 29, 30, 30, 30, 30, 30, 31, 32, 33, 34, 34, 34, 34, 34, 35, 36, 36, 36, 37, 38, 39 (list; graph; listen)
OFFSET

1,4

COMMENT

The following sequences all appear to have the same parity (with an extra zero term at the start of A010051): A010051, A061007, A035026, A069754, A071574. - Jeremy Gardiner (jeremy.gardiner(AT)btinternet.com), Aug 09, 2002

LINKS

T. D. Noe, Table of n, a(n) for n=1..1000

FORMULA

When n is prime, a(n) = 2 pi(n) - 3. When n is composite, a(n) = 2 pi(n) - 2. pi(n) is the prime counting function A000720.

EXAMPLE

a(6)=4 because there are 4 transitions: 1 to 2, 3 to 4, 4 to 5, and 5 to 6

MATHEMATICA

For[lst={0}; trans=0; n=2, n<100, n++, If[PrimeQ[n]!=PrimeQ[n-1], trans++ ]; AppendTo[lst, trans]]; lst

CROSSREFS

Cf. A000720.

Adjacent sequences: A069751 A069752 A069753 this_sequence A069755 A069756 A069757

Sequence in context: A071640 A102674 A097623 this_sequence A097622 A110010 A091987

KEYWORD

easy,nice,nonn

AUTHOR

T.D. Noe (noe(AT)sspectra.com), May 02 2002

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 May 16 01:24 EDT 2008. Contains 139630 sequences.


AT&T Labs Research