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.

User: Ralph-Joseph Tatt

Ralph-Joseph Tatt's wiki page.

Ralph-Joseph Tatt has authored 3 sequences.

A301506 Number of integers less than or equal to n whose largest prime factor is 5.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11
Offset: 0

Author

Ralph-Joseph Tatt, Mar 22 2018

Keywords

Comments

a(n) increases when n has the form 2^a*3^b*5^c, with a,b >= 0 and c > 0.
A distinct sequence can be generated for each prime number; this sequence is for the prime number 5. For an example using another prime number see A301461.

Examples

			a(15) = a(2^0 * 3^1 * 5^1); 5 is the largest prime factor, so a(15) exceeds the previous term by 1. For a(16) = a(2^4), there is no increase from the previous term.
		

Crossrefs

Cf. A080193.
Cf. A301461.

Programs

  • MATLAB
    clear;clc;
    prime = 5;
    limit = 10000;
    largest_divisor = ones(1,limit+1);
    for k = 0:limit
        f = factor(k);
        largest_divisor(k+1) = f(end);
    end
    for i = 1:limit+1
        FQN(i) = sum(largest_divisor(1:i)==prime);
    end
    output = [0:limit;FQN]'
  • Maple
    N:= 100: # for a(0)..a(N)
    L:= sort([seq(seq(seq(2^a*3^b*5^c, c=1..floor(log[5](N/(2^a*3^b)))),
      b = 0..floor(log[3](N/2^a))), a = 0 .. floor(log[2](N)))]):
    V:= Array(0..N):
    V[L]:= 1:
    ListTools:-PartialSums(convert(V,list)); # Robert Israel, Sep 22 2020
  • Mathematica
    Accumulate@ Array[Boole[FactorInteger[#][[-1, 1]] == 5] &, 80, 0] (* Michael De Vlieger, Apr 21 2018 *)

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

Original entry on oeis.org

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, 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, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11
Offset: 0

Author

Ralph-Joseph Tatt, Mar 21 2018

Keywords

Comments

a(n) increases when n has the form 2^a*3^b, with a >= 0 and b > 0.
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.

Examples

			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.
		

Crossrefs

Programs

  • MATLAB
    clear;clc;
    prime = 3;
    limit = 10000;
    largest_divisor = ones(1,limit+1);
    for k = 0:limit
        f = factor(k);
        largest_divisor(k+1) = f(end);
    end
    for i = 1:limit+1
        FQN(i) = sum(largest_divisor(1:i)==prime);
    end
    output = [0:limit;FQN]'
    
  • Mathematica
    Accumulate@ Array[Boole[FactorInteger[#][[-1, 1]] == 3] &, 80, 0] (* Michael De Vlieger, Apr 21 2018 *)
  • PARI
    gpf(n) = if (n<=1, n, vecmax(factor(n)[,1]));
    a(n) = sum(k=1, n, gpf(k)==3); \\ Michel Marcus, Mar 27 2018

Formula

From David A. Corneth, Mar 27 2018: (Start)
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).
a(3 * n + b) = A071521(n), n > 0, 0 <= b < 3. (End)
a(n) = A071521(n) - A070939(n). - Ridouane Oudra, Mar 24 2025

A303748 a(n) is the number of distinct terms of the form i^j where 0 <= i,j <= n.

Original entry on oeis.org

1, 2, 4, 8, 12, 20, 29, 41, 51, 61, 77, 97, 116, 140, 164, 190, 208, 240, 271, 307, 341, 379, 418, 462, 504, 540, 586, 622, 671, 727, 780, 840, 882, 942, 1004, 1068, 1114, 1186, 1255, 1327, 1398, 1478, 1554, 1638, 1718, 1800, 1885, 1977, 2064, 2136, 2226, 2322
Offset: 0

Author

Ralph-Joseph Tatt, Apr 30 2018

Keywords

Examples

			For n=3 the distinct terms are 0,1,2,3,4,8,9,27 so a(3) = 8.
		

Crossrefs

Cf. A126254.

Programs

  • Mathematica
    {1}~Join~Array[Length@ Union@ Map[#1^#2 & @@ # &, Rest@ Tuples[Range[0, #], {2}]] &, 51] (* Michael De Vlieger, Jan 31 2019 *)
  • Python
    def distinct(limit):
        unique = set()
        for i in range(limit+1):
            for j in range(limit+1):
                if i**j not in unique:
                    unique.add(i**j)
        return len(unique)
    print([distinct(i) for i in range(40)])

Formula

a(n) = A126254(n) + 1.