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.

A152021 Numbers a(n) are obtained by the direct application of sieve of Eratosthenes for A000695: retaining A000695(2)=4, we delete all multiples of 4, which are more than 4; retaining A000695(3)=5, we delete all multiples of 5, which are more than 5, etc.

This page as a plain text file.
%I A152021 #8 Sep 01 2019 02:36:01
%S A152021 4,5,17,21,69,81,257,261,277,321,337,341,1041,1089,1093,1109,1297,
%T A152021 1301,1349,1361,4101,4113,4117,4161,4177,4181,4353,4357,4373,4417,
%U A152021 4421,5121,5137,5141,5189,5201,5377,5381,5393,5441,5461,16389,16449,16453,16469,16641
%N A152021 Numbers a(n) are obtained by the direct application of sieve of Eratosthenes for A000695: retaining A000695(2)=4, we delete all multiples of 4, which are more than 4; retaining A000695(3)=5, we delete all multiples of 5, which are more than 5, etc.
%C A152021 If p is prime, then A000695(p) is in the sequence; but, e. g., A000695(25), A000695(55) are also in the sequence.
%p A152021 Contribution from _R. J. Mathar_, Oct 29 2010: (Start)
%p A152021 A000695 := proc(n) local dgsa ; if n= 0 then 0; else for a from procname(n-1)+1 do dgsa := convert(convert(a,base,4),set) ; if dgsa minus {0,1} = {} then return a; end if; end do: end if; end proc:
%p A152021 A152021 := proc(nmax) a := [seq(A000695(i),i=2..nmax)] ; ptr := 1; while ptr < nops(a) do for j from nops(a) to ptr+1 by -1 do if op(j,a) mod op(ptr,a) = 0 then a := subsop(j=NULL,a) ; end if; end do: ptr := ptr+1 ; end do: a ; end proc: A152021(120) ; (End)
%t A152021 f[n_] := FromDigits[IntegerDigits[n, 2], 4]; s = Array[f, 150, 2]; div[a_, b_] := Divisible[a, b] && a > b; n = 1; While[Length[s] > n, s = Select[s, !div[#, s[[n]]] &]; n++]; s (* _Amiram Eldar_, Aug 31 2019 *)
%Y A152021 Cf. A000695.
%K A152021 nonn
%O A152021 1,1
%A A152021 _Vladimir Shevelev_, Nov 20 2008
%E A152021 More terms from _R. J. Mathar_, Oct 29 2010
%E A152021 More terms from _Amiram Eldar_, Aug 31 2019