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.

A363123 Primitive terms of A363122: terms k of A363122 such that k/2 is not a term of A363122.

This page as a plain text file.
%I A363123 #20 May 19 2023 04:23:46
%S A363123 2,12,40,56,120,144,168,176,208,280,528,544,608,624,720,736,800,840,
%T A363123 864,880,928,992,1008,1040,1232,1456,1584,1632,1824,1872,2208,2288,
%U A363123 2368,2400,2624,2640,2720,2752,2784,2976,3008,3040,3120,3136,3392,3680,3696,3776
%N A363123 Primitive terms of A363122: terms k of A363122 such that k/2 is not a term of A363122.
%C A363123 If k is a term of this sequence then k*2^m is a term of A363122 for any m >= 0.
%H A363123 Amiram Eldar, <a href="/A363123/b363123.txt">Table of n, a(n) for n = 1..10000</a>
%p A363123 filter:= proc(n) local F2,Fp,v2,vp, t;
%p A363123   F2, Fp:= selectremove(t -> t[1]=2, ifactors(n)[2]);
%p A363123   if Fp = [] then return (n=2) fi;
%p A363123   v2:= 2^F2[1,2];
%p A363123   vp:= max(map(t -> t[1]^t[2],Fp));
%p A363123   v2 > vp and v2/2 <= vp;
%p A363123 end proc:
%p A363123 select(filter, [seq(i,i=2.10000,2)]); # _Robert Israel_, May 18 2023
%t A363123 q[n_] := Module[{e = IntegerExponent[n, 2]}, 2^e > Max[Power @@@ FactorInteger[n/2^e]]]; Select[Range[2, 10000, 2], q[#] && ! q[#/2] &]
%o A363123 (PARI) is1(n) = {my(e = valuation(n, 2), m = n>>e); if(m == 1, n>1, f = factor(m); 2^e > vecmax(vector(#f~, i, f[i, 1]^f[i, 2]))); } \\ A363122
%o A363123 is(n) = !(n%2) && is1(n) && !is1(n/2)
%o A363123 (Python)
%o A363123 from itertools import count, islice
%o A363123 from sympy import factorint
%o A363123 def A363123_gen(startvalue=2): # generator of terms
%o A363123     return filter(lambda n:(m:=n&-n)>max((p**e for p, e in factorint(n>>(~n&n-1).bit_length()).items()),default=1)>=m>>1,count(max(startvalue,2)))
%o A363123 A363123_list = list(islice(A363123_gen(),20)) # _Chai Wah Wu_, May 17 2023
%Y A363123 Cf. A363122.
%K A363123 nonn,easy
%O A363123 1,1
%A A363123 _Amiram Eldar_, May 16 2023