login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A305800 Filter sequence for a(prime) = constant sequences. 22
1, 2, 2, 3, 2, 4, 2, 5, 6, 7, 2, 8, 2, 9, 10, 11, 2, 12, 2, 13, 14, 15, 2, 16, 17, 18, 19, 20, 2, 21, 2, 22, 23, 24, 25, 26, 2, 27, 28, 29, 2, 30, 2, 31, 32, 33, 2, 34, 35, 36, 37, 38, 2, 39, 40, 41, 42, 43, 2, 44, 2, 45, 46, 47, 48, 49, 2, 50, 51, 52, 2, 53, 2, 54, 55, 56, 57, 58, 2, 59, 60, 61, 2, 62, 63, 64, 65, 66, 2, 67, 68, 69, 70, 71, 72, 73, 2, 74, 75, 76, 2, 77, 2, 78, 79, 80, 2, 81, 2, 82, 83, 84, 2, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Restricted growth sequence transform of A239968.

In the following, A stands for this sequence, A305800, and S -> T (where S and T are sequence A-numbers) indicates that for all i, j: S(i) = S(i) => T(i) = T(j).

For example, the following implications hold:

  A -> A300247 -> A305897 -> A077462 -> A101296,

  A -> A290110 -> A300250 -> A101296.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..100000

FORMULA

a(1) = 1; for n > 1, a(n) = 2 for prime n, and a(n) = 1+n-A000720(n) for composite n.

MATHEMATICA

Join[{1}, Table[If[PrimeQ[n], 2, 1+n-PrimePi[n]], {n, 2, 150}]] (* Harvey P. Dale, Jul 12 2019 *)

PROG

(PARI) A305800(n) = if(1==n, n, if(isprime(n), 2, 1+n-primepi(n)));

CROSSREFS

Cf. A000720, A239968.

Differs from A296073 for the first time at n=125, as a(125) = 96, while A296073(125) = 33.

Cf. also A305900, A305801, A295300, A289626 for other "upper level" filters.

Sequence in context: A319693 A296073 A317943 * A293442 A318470 A175501

Adjacent sequences:  A305797 A305798 A305799 * A305801 A305802 A305803

KEYWORD

nonn

AUTHOR

Antti Karttunen, Jun 14 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 02:16 EDT 2019. Contains 327088 sequences. (Running on oeis4.)