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!)
A002035 Numbers that contain primes to odd powers only.
(Formerly M0614 N0224)
17
2, 3, 5, 6, 7, 8, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 24, 26, 27, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 46, 47, 51, 53, 54, 55, 56, 57, 58, 59, 61, 62, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 82, 83, 85, 86, 87, 88, 89, 91, 93, 94, 95, 96, 97, 101 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Complement of the union of {1} and A072587. - Reinhard Zumkeller, Nov 15 2012, corrected version from Jun 23 2002
A036537 is a subsequence and this sequence is a subsequence of A162644. - Reinhard Zumkeller, Jul 08 2009
The asymptotic density of this sequence is A065463. - Amiram Eldar, Sep 18 2022
REFERENCES
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Eckford Cohen, Quadratic congruences with an odd number of summands, Amer. Math. Monthly, 73 (1966), 138-143.
MAPLE
isA002035 := proc(n)
local pe;
for pe in ifactors(n)[2] do
if type(pe[2], 'even') then
return false;
end if;
end do:
true ;
end proc:
A002035 := proc(n)
option remember;
if n =1 then
2;
else
for a from procname(n-1)+1 do
if isA002035(a) then
return a;
end if;
end do:
end if;
end proc:
seq(A002035(n), n=1..100) ; # R. J. Mathar, Nov 27 2017
MATHEMATICA
ok[n_] := And @@ OddQ /@ FactorInteger[n][[All, 2]];
Select[Range[2, 101], ok]
(* Jean-François Alcover, Apr 22 2011 *)
Select[Range[2, 110], AllTrue[FactorInteger[#][[All, 2]], OddQ]&] (* Harvey P. Dale, Nov 02 2022 *)
PROG
(Haskell)
a002035 n = a002035_list !! (n-1)
a002035_list = filter (all odd . a124010_row) [1..]
-- Reinhard Zumkeller, Nov 14 2012
(PARI) is(n)=Set(factor(n)[, 2]%2)==[1] \\ Charles R Greathouse IV, Feb 07 2017
CROSSREFS
Sequence in context: A239161 A162644 A268335 * A336591 A036537 A072510
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
More terms from Reinhard Zumkeller, Jun 23 2002
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 July 2 03:00 EDT 2024. Contains 373947 sequences. (Running on oeis4.)