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.

Showing 1-3 of 3 results.

A078899 Number of times the greatest prime factor of n is the greatest prime factor for numbers <=n; a(1)=1.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Dec 12 2002

Keywords

Comments

For n>1: a(n)=1 iff n is prime;
a(n) = n/p for n<=p*(p+1) and p = greatest prime factor of n.

Crossrefs

Programs

  • Maple
    p:= proc() 0 end:
    a:= proc(n) option remember; local t;
          t:= max(numtheory[factorset](n)[]);
          p(t):= p(t)+1
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 09 2015
  • Mathematica
    p[_] = 0; a[1] = 1;
    a[n_] := a[n] = Module[{t}, t = FactorInteger[n][[-1, 1]]; p[t] = p[t]+1];
    Array[a, 100] (* Jean-François Alcover, Jun 09 2018, after Alois P. Heinz *)

Formula

Ordinal transform of A006530 (Gpf). - Franklin T. Adams-Watters, Aug 28 2006

A078896 Number of times the smallest prime factor of n is a factor in all numbers <= n; a(1) = 1.

Original entry on oeis.org

1, 1, 1, 3, 1, 4, 1, 7, 4, 8, 1, 10, 1, 11, 6, 15, 1, 16, 1, 18, 9, 19, 1, 22, 6, 23, 13, 25, 1, 26, 1, 31, 15, 32, 8, 34, 1, 35, 18, 38, 1, 39, 1, 41, 21, 42, 1, 46, 8, 47, 23, 49, 1, 50, 13, 53, 27, 54, 1, 56, 1, 57, 30, 63, 15, 64, 1, 66, 32, 67, 1, 70, 1, 71, 35, 73, 12, 74, 1, 78, 40
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 12 2002

Keywords

Crossrefs

Programs

  • Mathematica
    With[{s = Array[Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger[#]] &, 81]}, Array[Count[Take[s, #1], #2, 2] & @@ {#, s[[#, 1]]} &, Length@ s]] (* Michael De Vlieger, Dec 16 2017 *)
  • PARI
    a(n) = if (n==1, 1, my(p = factor(n)[1, 1]); sum(i=1, n, valuation(i, p))); \\ Michel Marcus, Dec 27 2014

Formula

For n>1, a(n) = 1 iff n is prime.
a(n) = A078897(n) iff n is a prime power (A000961).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Sum_{p prime} (1/(p*(p-1))) * Product_{primes q < p} (1-1/q) = 0.6125177915489... . - Amiram Eldar, May 14 2025

A252890 Number of times the greatest prime factor of n^2 + 1 is a factor in all numbers <= n.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 4, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 6, 1, 1, 4, 1, 3, 1, 1, 2, 7, 1, 1, 2, 1, 1, 1, 1, 2, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 6, 1, 3, 4, 1, 2, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1
Offset: 1

Views

Author

Michel Lagneau, Dec 24 2014

Keywords

Comments

The greatest prime factor is counted with multiplicity (see the example).
a(n)=1 iff n^2 + 1 is prime.

Examples

			a(7)=4 because 7^2 + 1 = 50 and 5 is 4 times a factor:
2^2+1 = 5;
3^2+1 = 10 = 2*5;
7^2+1 = 50 = 2*5*5 (two times).
		

Crossrefs

Programs

  • Maple
    with(numtheory): with(padic,ordp):
    f:= proc(n) local p ,q, n0;
      q:=factorset(n^2+1);n0:=nops(q);p:= q[n0];
      add(ordp(k^2+1, p), k=1..n);
    end proc:
    seq(f(n), n=1.. 100);
    # Using code from Robert Israel adapted for this sequence. See A078897.
Showing 1-3 of 3 results.