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!)
A355237 First occurrence of difference n between two consecutive terms of A000404. a(n) gives the lower term. The upper term is A355238. 3

%I #15 Sep 09 2022 08:04:58

%S 17,8,2,13,20,74,90,137,377,3050,986,1669,4181,6530,1493,8434,9704,

%T 22160,10709,5165,16109,154708,58418,31657,52393,401480,176810,101349,

%U 105572,678356,241882,501716,393817,284002,685541,1437353,1751296,3225578,3439258,2479594

%N First occurrence of difference n between two consecutive terms of A000404. a(n) gives the lower term. The upper term is A355238.

%F a(n) = A355238(n) - n.

%o (Python)

%o from itertools import count

%o from sympy import factorint

%o def A355237(n):

%o m = 2

%o for k in count(2):

%o c = False

%o for p in (f:=factorint(k)):

%o if (q:= p & 3)==3 and f[p]&1:

%o break

%o elif q == 1:

%o c = True

%o else:

%o if c or f.get(2,0)&1:

%o if k-m == n:

%o return m

%o m = k # _Chai Wah Wu_, Jul 01 2022

%Y Cf. A000404, A104271, A355238.

%K nonn

%O 1,1

%A _Hugo Pfoertner_, Jun 30 2022

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 May 9 19:33 EDT 2024. Contains 372354 sequences. (Running on oeis4.)