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.

Previous Showing 11-13 of 13 results.

A100387 a(n) is the largest number x such that for m=n to n+x-1, A006530(m) decreases.

Original entry on oeis.org

1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 4, 3, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 3, 2, 1, 4, 3, 2, 1, 2, 1, 3, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 4, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 2, 1, 2, 1, 1, 3, 2, 1, 1, 2, 1, 1, 3, 2, 1, 2, 1, 1, 1, 1, 3, 2, 1, 2, 1, 2, 1, 2, 1, 3, 2, 1
Offset: 2

Views

Author

Labos Elemer, Dec 10 2004

Keywords

Comments

A006530(m) is the largest prime factor of m.

Examples

			a(13)=4 because the largest prime factors of 13,14,15,16 are 13,7,5,2; but A006530(17)=17.
		

Crossrefs

Programs

  • Mathematica
    <
    				

Formula

From Pontus von Brömssen, Nov 09 2022: (Start)
a(n) = 1 if and only if n >= 2 and n is a term of A070089.
If a(n) > 1 then a(n) = a(n+1)+1.
(End)

Extensions

Edited by Don Reble, Jun 13 2007

A359953 a(1) = 0, a(2) = 1. For n >= 3, if the greatest prime dividing n is greater than the greatest prime dividing n-1, then a(n) = a(n-1) + 1. Otherwise a(n) = a(n-1) - 1.

Original entry on oeis.org

0, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 2, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 5, 6, 7, 6, 5, 6, 5, 4, 3, 4, 3, 4, 3, 2, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 6, 5, 6, 5, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 2, 3, 2, 3, 4, 3, 2, 3, 4, 3
Offset: 1

Views

Author

Tamas Sandor Nagy, Jan 19 2023

Keywords

Comments

The first negative value is at a(3888). Within the first 1000000 values are the negative record values a(n) = -4 at n = {3913, 3915, 3927, 3933}. - Thomas Scheuerle, Jan 20 2023

Examples

			a(5) = a(4) + 1 = 1 + 1 = 2 because A006530(5) = 5 > A006530(4) = 2.
		

Crossrefs

Programs

  • MATLAB
    function a = A359953(max_n)
        a = [0 cumsum(sign(diff([0 arrayfun(@(x)(max(factor(x))),[2:max_n])])))];
    end % Thomas Scheuerle, Jan 20 2023
    
  • Mathematica
    Join[{0}, Accumulate@ Sign@ Differences@ Table[FactorInteger[n][[-1, 1]], {n, 1, 100}]] (* Amiram Eldar, Jan 20 2023, after the MATLAB code *)
  • PARI
    lista(nn) = my(va = vector(nn)); va[1] = 0; va[2] = 1; for (n=3, nn, if (vecmax(factor(n)[,1]) > vecmax(factor(n-1)[,1]), va[n] = va[n-1] + 1, va[n] = va[n-1] - 1);); va; \\ Michel Marcus, Jan 31 2023

Formula

For n >= 2, if A006530(n) > A006530(n-1), then a(n) = a(n-1) + 1; a(n) = a(n-1) - 1 otherwise.
a(n) = (-1)*Sum_{i=1..n-1} (-1)^A087429(i).
a(1 + A070089(n)) = 1 + a(A070089(n)). - Thomas Scheuerle, Jan 20 2023

A334073 Decimal expansion of Sum_{k >= 1} e(k)/2^k, where e(k) = 1 if gpf(k+1) > gpf(k) and 0 otherwise, and gpf(k) is the greatest prime dividing k (A006530).

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Apr 13 2020

Keywords

Comments

This constant is irrational (Erdős and Pomerance, 1978).
It is assumed that gpf(1) = A006530(1) = 1.

Examples

			0.83522592242052459434878298057517624119404331710532...
		

Crossrefs

Programs

  • Mathematica
    gpf[n_] := FactorInteger[n][[-1, 1]]; e[n_] := Boole[gpf[n+1] > gpf[n]]; RealDigits[Sum[e[n]/2^n, {n, 1, 500}], 10, 100][[1]]
Previous Showing 11-13 of 13 results.