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.

A245636 Number of terms of A245630 <= n.

This page as a plain text file.
%I A245636 #22 May 08 2021 23:39:14
%S A245636 1,1,1,1,1,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
%T A245636 4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
%U A245636 5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
%N A245636 Number of terms of A245630 <= n.
%H A245636 Robert Israel, <a href="/A245636/b245636.txt">Table of n, a(n) for n = 1..10000</a>
%H A245636 Paul Erdős, <a href="http://www.jstor.org/stable/2306529">Solution to Advanced Problem 4413</a>, American Mathematical Monthly, 59 (1952) 259-261.
%F A245636 As n -> infinity, a(n)/sqrt(n) -> Product_{i=1..infinity} (1 - 1/prime(i))/(1 - (prime(i)*prime(i+1))^(-1/2)), see Erdős reference.
%e A245636 The first two terms of A245630 are 1 and 6, so a(n) = 1 for 1 <= n <= 5 and a(6) = 2.
%p A245636 N:= 10^4: # to get a(1) to a(N)
%p A245636 PP:= [seq(ithprime(i)*ithprime(i+1), i=1.. numtheory[pi](floor(sqrt(N)))-1)]:
%p A245636 ext:= (x, p) -> seq(x*p^i, i=0..floor(log[p](N/x))):
%p A245636 S:= {1}: for i from 1 to nops(PP) do S:= map(ext, S, PP[i]) od:
%p A245636 E:= Array(1..N):
%p A245636 for s in S do E[s]:= 1 od:
%p A245636 A:= map(round,Statistics:-CumulativeSum(E)):
%p A245636 seq(A(i),i=1..N);
%t A245636 M = 10^4;
%t A245636 T = Table[Prime[n] Prime[n+1], {n, 1, PrimePi[Sqrt[M]]}];
%t A245636 T2 = Select[Join[T, T^2], # <= M&];
%t A245636 S = Join[{1}, T2 //. {a___, b_, c___, d_, e___} /; b*d <= M && FreeQ[{a, b, c, d, e}, b*d] :> Sort[{a, b, c, d, e, b*d}]];
%t A245636 ee = Table[0, {M}];
%t A245636 Scan[Set[ee[[#]], 1]&, S];
%t A245636 Accumulate[ee] (* _Jean-François Alcover_, Apr 17 2019 *)
%Y A245636 Cf. A006094, A028260, A245630.
%K A245636 nonn
%O A245636 1,6
%A A245636 _Robert Israel_, Jul 28 2014