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.

A125087 a(1)=1. For n>1, a(n) = the number of terms (from among the first n-1 terms of the sequence) that are equal to at least one exponent in the prime factorization of n.

This page as a plain text file.
%I A125087 #21 May 11 2023 23:52:06
%S A125087 1,1,2,1,3,3,3,3,1,4,4,5,4,4,4,5,4,5,4,5,4,4,4,8,1,5,4,6,5,5,5,8,5,5,
%T A125087 5,1,6,6,6,10,6,6,6,7,7,6,6,17,1,8,7,8,7,11,7,11,7,7,7,8,7,7,8,9,7,7,
%U A125087 7,8,7,7,7,5,7,7,8,8,7,7,7,18,11,7,7,8,7,7,7,11,7,8,7,8,7,7,7,19,7,8,8,1,8
%N A125087 a(1)=1. For n>1, a(n) = the number of terms (from among the first n-1 terms of the sequence) that are equal to at least one exponent in the prime factorization of n.
%H A125087 Katarzyna Matylla, <a href="/A125087/b125087.txt">Table of n, a(n) for n = 1..1000</a>
%e A125087 12 = 2^2 * 3^1, So the exponents in the prime-factorization of 12 are 1 and 2. There are 4 terms that equal 1 among the first 11 terms of the sequence. (Those terms are a(1), a(2), a(4), a(9)). There is one term (a(3)) that equals 2. So a(12) = 4+1 = 5.
%e A125087 14 = 2^1 * 7^1. So the only distinct exponent in the prime-factorization of 14 is 1. There are 4 terms from among the first 13 terms of the sequence that equal 1. So a(14) = 4.
%t A125087 f[l_List] :=Append[l, Length @Select[l, MemberQ[Last /@ FactorInteger[Length[l] + 1], # ] &]];Nest[f, {1}, 100] (* _Ray Chandler_, Nov 21 2006 *)
%o A125087 (Maxima) /* program from _Katarzyna Matylla_, Feb 19 2008: Variable max = how much terms we need. Generating 1000 terms took a few hours: */
%o A125087 "|"(a,b):= if b=0 then true else if a=0 then false else if (floor(b/a))=(b/a) then true else false;
%o A125087 max:1000;
%o A125087 infix("|");
%o A125087 deg(n,p):=if p<2 then 0 else block(d:0, loop, if ((p^(d+1))|n) then d:d+1 else go(end), go(loop), end, d);
%o A125087 f:makelist(0,i,1,max);
%o A125087 dg:makelist(0, i, 1, max);
%o A125087 f[1]:1;
%o A125087 for n:2 through max do block(for i:2 through n do dg[i]:deg(n,i),k:0, loop1, k:k+1, p:2, loop, if (f[k]=dg[p]) then block(f[n]:f[n]+1, p:n+1), if (p<=n) then p:next_prime(p), if (p<=n) then go(loop), if k<(n-1) then go(loop1));
%Y A125087 Cf. A125088.
%K A125087 nonn
%O A125087 1,3
%A A125087 _Leroy Quet_, Nov 19 2006
%E A125087 Extended by _Ray Chandler_, Nov 21 2006