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.

A301461 Number of integers less than or equal to n whose largest prime factor is 3.

This page as a plain text file.
%I A301461 #50 Mar 31 2025 02:11:30
%S A301461 0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,6,6,6,7,7,7,7,7,7,7,
%T A301461 7,7,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,
%U A301461 10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11
%N A301461 Number of integers less than or equal to n whose largest prime factor is 3.
%C A301461 a(n) increases when n has the form 2^a*3^b, with a >= 0 and b > 0.
%C A301461 A distinct sequence can be generated for each prime number; this sequence is for the prime number 3. For an example using another prime number see A301506.
%F A301461 From _David A. Corneth_, Mar 27 2018: (Start)
%F A301461 a(n) - a(n - 1) = 1 if and only if n is in 3 * A003586. If n isn't in that sequence then a(n) = a(n - 1).
%F A301461 a(3 * n + b) = A071521(n), n > 0, 0 <= b < 3. (End)
%F A301461 a(n) = A071521(n) - A070939(n). - _Ridouane Oudra_, Mar 24 2025
%e A301461 a(12) = a(2^2 * 3^1); 3 is the largest prime factor, so a(12) exceeds the previous term by 1. For a(13), 13 is a prime, so there is no increase from the previous term.
%t A301461 Accumulate@ Array[Boole[FactorInteger[#][[-1, 1]] == 3] &, 80, 0] (* _Michael De Vlieger_, Apr 21 2018 *)
%o A301461 (MATLAB)
%o A301461 clear;clc;
%o A301461 prime = 3;
%o A301461 limit = 10000;
%o A301461 largest_divisor = ones(1,limit+1);
%o A301461 for k = 0:limit
%o A301461     f = factor(k);
%o A301461     largest_divisor(k+1) = f(end);
%o A301461 end
%o A301461 for i = 1:limit+1
%o A301461     FQN(i) = sum(largest_divisor(1:i)==prime);
%o A301461 end
%o A301461 output = [0:limit;FQN]'
%o A301461 (PARI) gpf(n) = if (n<=1, n, vecmax(factor(n)[,1]));
%o A301461 a(n) = sum(k=1, n, gpf(k)==3); \\ _Michel Marcus_, Mar 27 2018
%Y A301461 Cf. A003586, A065119, A071521.
%Y A301461 Cf. A301506, A071521, A070939.
%K A301461 nonn
%O A301461 0,7
%A A301461 _Ralph-Joseph Tatt_, Mar 21 2018