login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338101 Smallest odd prime dividing n is a(n)-th prime, or 0 if no such prime exists. 1
0, 0, 2, 0, 3, 2, 4, 0, 2, 3, 5, 2, 6, 4, 2, 0, 7, 2, 8, 3, 2, 5, 9, 2, 3, 6, 2, 4, 10, 2, 11, 0, 2, 7, 3, 2, 12, 8, 2, 3, 13, 2, 14, 5, 2, 9, 15, 2, 4, 3, 2, 6, 16, 2, 3, 4, 2, 10, 17, 2, 18, 11, 2, 0, 3, 2, 19, 7, 2, 3, 20, 2, 21, 12, 2, 8, 4, 2, 22, 3, 2, 13, 23, 2, 3, 14, 2, 5, 24, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

Index entries for sequences computed from indices in prime factorization

FORMULA

a(n) = A000720(A020639(A000265(n))).

a(n) = A000720(A078701(n)).

EXAMPLE

70 = 2 * 5 * 7 = prime(1) * prime(3) * prime(4), 3 < 4, so a(70) = 3.

MAPLE

f:= proc(n) local w;

   w:= numtheory:-factorset(n) minus {2};

   if w = {} then 0 else numtheory:-pi(min(w)) fi

end proc:

map(f, [$1..100]); # Robert Israel, Nov 13 2020

MATHEMATICA

Array[If[Or[# == 1, ! IntegerQ@ #], 0, PrimePi@ #] &@ SelectFirst[FactorInteger[#][[All, 1]], OddQ] &, 90] (* Michael De Vlieger, Nov 13 2020 *)

PROG

(PARI) a(n) = my(v = select(x->((x%2)==1), factor(n)[, 1])); if (#v, primepi(vecmin(v)), 0); \\ Michel Marcus, Nov 13 2020

CROSSREFS

Cf. A000079 (positions of 0's), A000265, A000720, A020639, A055396, A078701.

Sequence in context: A078031 A077961 A077962 * A338490 A213607 A298932

Adjacent sequences:  A338098 A338099 A338100 * A338102 A338103 A338104

KEYWORD

nonn

AUTHOR

Ilya Gutkovskiy, Nov 10 2020

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 June 19 17:53 EDT 2021. Contains 345144 sequences. (Running on oeis4.)