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.

A225316 a(n) = practical(2^n) where practical(n) is the n-th practical number (A005153).

This page as a plain text file.
%I A225316 #33 Aug 24 2023 07:29:43
%S A225316 1,2,6,18,42,108,270,594,1350,3008,6678,14620,31724,67712,143792,
%T A225316 305856,651126,1377918,2908308,6120672,12848472,26854938,55963260,
%U A225316 116389896,241526012,500796416,1037764968,2147851712,4440630150,9176799780,18946755918,39092425578,80569691202
%N A225316 a(n) = practical(2^n) where practical(n) is the n-th practical number (A005153).
%C A225316 a(n) is analogous to A033844.
%F A225316 a(n) = A005153(A000079(n)). - _Michel Marcus_, Nov 12 2015
%e A225316 a(7) = A005153(128) = 594.
%t A225316 PracticalQ[n_] := Module[{f, p, e, prod=1, ok=True}, If[n<1||(n>1&&OddQ[n]), False, If[n==1, True, f=FactorInteger[n]; {p, e}=Transpose[f]; Do[If[p[[i]]>1+DivisorSigma[1, prod], ok=False; Break[]]; prod=prod*p[[i]]^e[[i]], {i, Length[p]}]; ok]]]; nextpractical[n1_]:=(m1=n1+1; While[!PracticalQ[m1],m1++]; m1); Table[Nest[nextpractical,0,2^n],{n,0,20}] (* using _T. D. Noe_'s program A005153 *)
%o A225316 (Python)
%o A225316 from math import prod
%o A225316 from itertools import count
%o A225316 from sympy import factorint
%o A225316 def A225316(n):
%o A225316     if n:
%o A225316         c, k = 1, 1<<n
%o A225316         for m in count(2,2):
%o A225316             f = list(factorint(m).items())
%o A225316             if all(f[i][0] <= 1+prod((f[j][0]**(f[j][1]+1)-1)//(f[j][0]-1) for j in range(i)) for i in range(len(f))):
%o A225316                 c += 1
%o A225316                 if c == k:
%o A225316                     return m
%o A225316     else:
%o A225316         return 1 # _Chai Wah Wu_, Aug 04 2023
%Y A225316 Cf. A000079, A005153, A033844, A225559, A322371.
%K A225316 nonn
%O A225316 0,2
%A A225316 _Frank M Jackson_, May 05 2013
%E A225316 a(26)-a(27) from _Chai Wah Wu_, Aug 07 2023
%E A225316 a(28)-a(29) from _David A. Corneth_, Aug 07 2023
%E A225316 More terms from _David A. Corneth_, Aug 14 2023