cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A002035 Numbers that contain primes to odd powers only.

This page as a plain text file.
%I A002035 M0614 N0224 #51 Feb 16 2024 01:20:13
%S A002035 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,
%T A002035 35,37,38,39,40,41,42,43,46,47,51,53,54,55,56,57,58,59,61,62,65,66,67,
%U A002035 69,70,71,73,74,77,78,79,82,83,85,86,87,88,89,91,93,94,95,96,97,101
%N A002035 Numbers that contain primes to odd powers only.
%C A002035 Complement of the union of {1} and A072587. - _Reinhard Zumkeller_, Nov 15 2012, corrected version from Jun 23 2002
%C A002035 A036537 is a subsequence and this sequence is a subsequence of A162644. - _Reinhard Zumkeller_, Jul 08 2009
%C A002035 The asymptotic density of this sequence is A065463. - _Amiram Eldar_, Sep 18 2022
%D A002035 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A002035 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A002035 T. D. Noe, <a href="/A002035/b002035.txt">Table of n, a(n) for n = 1..1000</a>
%H A002035 Eckford Cohen, <a href="http://www.jstor.org/stable/2313545">Quadratic congruences with an odd number of summands</a>, Amer. Math. Monthly, 73 (1966), 138-143.
%p A002035 isA002035 := proc(n)
%p A002035     local pe;
%p A002035     for pe in ifactors(n)[2] do
%p A002035         if type(pe[2],'even') then
%p A002035             return false;
%p A002035         end if;
%p A002035     end do:
%p A002035     true ;
%p A002035 end proc:
%p A002035 A002035 := proc(n)
%p A002035     option remember;
%p A002035     if n =1 then
%p A002035         2;
%p A002035     else
%p A002035         for a from procname(n-1)+1 do
%p A002035             if isA002035(a) then
%p A002035                 return a;
%p A002035             end if;
%p A002035         end do:
%p A002035     end if;
%p A002035 end proc:
%p A002035 seq(A002035(n),n=1..100) ; # _R. J. Mathar_, Nov 27 2017
%t A002035 ok[n_] := And @@ OddQ /@ FactorInteger[n][[All, 2]];
%t A002035 Select[Range[2, 101], ok]
%t A002035 (* _Jean-François Alcover_, Apr 22 2011 *)
%t A002035 Select[Range[2,110],AllTrue[FactorInteger[#][[All,2]],OddQ]&] (* _Harvey P. Dale_, Nov 02 2022 *)
%o A002035 (Haskell)
%o A002035 a002035 n = a002035_list !! (n-1)
%o A002035 a002035_list = filter (all odd . a124010_row) [1..]
%o A002035 -- _Reinhard Zumkeller_, Nov 14 2012
%o A002035 (PARI) is(n)=Set(factor(n)[,2]%2)==[1] \\ _Charles R Greathouse IV_, Feb 07 2017
%Y A002035 Cf. A000203, A036537, A065463, A072586, A072587, A124010, A162644, A188999, A295316.
%K A002035 nonn,nice
%O A002035 1,1
%A A002035 _N. J. A. Sloane_
%E A002035 More terms from _Reinhard Zumkeller_, Jun 23 2002