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.

A345444 a(n) = A344005(2*n+1).

This page as a plain text file.
%I A345444 #11 Jul 06 2021 20:24:26
%S A345444 1,2,4,6,8,10,12,5,16,18,6,22,24,26,28,30,11,14,36,12,40,42,9,46,48,
%T A345444 17,52,10,18,58,60,27,25,66,23,70,72,24,21,78,80,82,34,29,88,13,30,19,
%U A345444 96,44,100,102,14,106,108,36,112,45,26,34,120,41,124,126,42,130,56,54,136,138,47,65,29
%N A345444 a(n) = A344005(2*n+1).
%C A345444 The companion bisection to A011772.
%F A345444 a(n) = 2*n if 2*n+1 is a prime power. - _Chai Wah Wu_, Jul 06 2021
%o A345444 (Python 3.8+)
%o A345444 from itertools import combinations
%o A345444 from math import prod
%o A345444 from sympy import factorint, divisors
%o A345444 from sympy.ntheory.modular import crt
%o A345444 def A345444(n):
%o A345444     if n == 0:
%o A345444         return 1
%o A345444     k = 2*n+1
%o A345444     plist = [p**q for p, q in factorint(k).items()]
%o A345444     return k-1 if len(plist) == 1 else int(min(min(crt([m,k//m],[0,-1])[0],crt([k//m,m],[0,-1])[0]) for m in (prod(d) for l in range(1,len(plist)//2+1) for d in combinations(plist,l)))) # _Chai Wah Wu_, Jul 06 2021
%Y A345444 Cf. A011772, A344005.
%K A345444 nonn
%O A345444 0,2
%A A345444 _N. J. A. Sloane_, Jul 06 2021