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-2 of 2 results.

A085818 For n > 1: a(n) = p if n = p^e with p prime and e > 1, otherwise a(n) = (n-m)-th prime, where m = number of nonprime prime powers <= n; a(1)=1.

Original entry on oeis.org

1, 2, 3, 2, 5, 7, 11, 2, 3, 13, 17, 19, 23, 29, 31, 2, 37, 41, 43, 47, 53, 59, 61, 67, 5, 71, 3, 73, 79, 83, 89, 2, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 7, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 04 2003

Keywords

Comments

a(n) = A025473(n) if n = p^e with p prime and e > 1, otherwise a(n) = A008578(n-A085501(n));
n divides A085819(n) = Product_{k<=n} a(k), as by construction: a(1)=1; if n divides A085819(n-1) then a(n) = smallest prime not occurring earlier; if n does not divide A085819(n-1) then a(n) = greatest prime factor of n (A006530);
A000040 occurs infinitely many times as a subsequence.
a(A085971(n))=A000040(n) and for all k > 1: a(A000040(n)^k)=A000040(n); A085985(n)=A049084(a(n)). - Reinhard Zumkeller, Jul 06 2003

Crossrefs

Programs

  • PARI
    f(n) = 1 + sum(k=2, n, isprimepower(k) && !isprime(k));  \\ A085501
    a(n) = {if (n==1, return (1)); my(p); if (isprimepower(n, &p) && !isprime(n), p, prime(n-f(n)));} \\ Michel Marcus, Jan 28 2021
    
  • Python
    from sympy import primefactors, prime, primepi, integer_nthroot
    def A085818(n): return 1 if n==1 else (f[0] if len(f:=primefactors(n))==1 and f[0]Chai Wah Wu, Aug 20 2024

A090729 a(n) = 21a(n-1) - a(n-2), starting with a(0) = 2 and a(1) = 21.

Original entry on oeis.org

2, 21, 439, 9198, 192719, 4037901, 84603202, 1772629341, 37140612959, 778180242798, 16304644485799, 341619353958981, 7157701788652802, 149970118207749861, 3142214780574094279, 65836540273848229998
Offset: 0

Views

Author

Nikolay V. Kosinov (kosinov(AT)unitron.com.ua), Jan 18 2004

Keywords

Comments

A Chebyshev T-sequence with Diophantine property.
a(n) gives the general (nonnegative integer) solution of the Pell equation a^2 - 437*b^2 =+4 with companion sequence b(n)=A092499(n), n>=0.

References

  • O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 30, Satz 3.35, p. 109 and table p. 108).

Crossrefs

Cf. A085985.
a(n)=sqrt(4 + 437*A092499(n)^2), n>=1, (Pell equation d=437, +4).
Cf. A077428, A078355 (Pell +4 equations).

Programs

  • Mathematica
    a[0] = 2; a[1] = 21; a[n_] := 21a[n - 1] - a[n - 2]; Table[ a[n], {n, 0, 15}] (* Robert G. Wilson v, Jan 30 2004 *)
  • Sage
    [lucas_number2(n,21,1) for n in range(0,20)] # Zerinvary Lajos, Jun 27 2008

Formula

a(n) = S(n, 21) - S(n-2, 21) = 2*T(n, 21/2) with S(n, x) := U(n, x/2), S(-1, x) := 0, S(-2, x) := -1. S(n, 21)=A092499(n+1). U-, resp. T-, are Chebyshev's polynomials of the second, resp. first, case. See A049310 and A053120.
a(n) = ap^n + am^n, with ap := (21+sqrt(437))/2 and am := (21-sqrt(437))/2.
G.f.: (2-21*x)/(1-21*x+x^2).

Extensions

Chebyshev and Pell comments from Wolfdieter Lang, Sep 10 2004
Showing 1-2 of 2 results.