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.

A339499 Decimal expansion of the generating constant for the composite numbers.

This page as a plain text file.
%I A339499 #18 Jun 17 2025 20:44:52
%S A339499 4,5,8,9,2,4,6,1,2,6,6,3,7,9,8,6,1,7,1,3,5,8,1,0,2,4,2,0,7,3,5,0,7,0,
%T A339499 7,3,6,9,2,7,4,1,4,8,3,3,8,6,1,6,7,4,8,3,0,6,5,0,1,9,9,9,5,7,4,4,4,9,
%U A339499 7,6,6,4,4,8,6,2,2,8,2,4,0,9,9,8,0,6,1,3,1,6,1,4,4,9,5,3,5,6,0,8
%N A339499 Decimal expansion of the generating constant for the composite numbers.
%C A339499 The integer parts of the sequence having this constant as starting value and thereafter a(n+1) = (frac(a(n))+1) * floor(a(n)), where floor and frac are integer and fractional part, are exactly the sequence of the composite numbers: see the Grime-Haran Numberphile video for details.
%H A339499 James Grime and Brady Haran, <a href="https://www.youtube.com/watch?v=_gCKX6VMvmU">2.920050977316</a>, Numberphile video, Nov 26 2020.
%F A339499 Sum_{k >= 1} (c(k) - 1)/(c(1) * c(2) * ... * c(k-1)), where c(k) is the k-th composite number.
%e A339499 4.5892461266379861713581024207350707369274148338616748...
%o A339499 (Python)
%o A339499 from mpmath import * #high precision computations
%o A339499                      #nsum function
%o A339499 from sympy import * # to generate prime numbers
%o A339499 mp.dps = 10000
%o A339499 #function that generates constant that encodes all composite numbers
%o A339499 #cnt - number of prime numbers
%o A339499 def composconst(cnt):
%o A339499     if cnt==1:
%o A339499         return 4-1
%o A339499     primlist=list()
%o A339499     i=0
%o A339499     while (i<cnt):
%o A339499         primlist.append(prime(i+1))
%o A339499         i=i+1
%o A339499     prims=set(primlist)
%o A339499     alllist=range(2,primlist[-1]+2) #all numbers [2..prime(cnt)+1]
%o A339499     alls=set(alllist)
%o A339499     comps=alls-prims #all composite numbers [4..prime(cnt)+1]
%o A339499     complist=list(comps)
%o A339499     cnt2 = len(complist)
%o A339499     return nsum(lambda k: (complist[int(k)]-1)/nprod(lambda l: complist[int(l)],[0,k-1]),[0,cnt2-1])
%o A339499 composconst(50)
%Y A339499 Cf. A002808, A249270, A339204.
%K A339499 nonn,cons
%O A339499 1,1
%A A339499 _Kamil Zabkiewicz_, Dec 07 2020