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

A090306 a(n) = 17*a(n-1) + a(n-2), starting with a(0) = 2 and a(1) = 17.

Original entry on oeis.org

2, 17, 291, 4964, 84679, 1444507, 24641298, 420346573, 7170533039, 122319408236, 2086600473051, 35594527450103, 607193567124802, 10357885168571737, 176691241432844331, 3014108989526925364, 51416544063390575519
Offset: 0

Views

Author

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

Keywords

Comments

Lim_{n-> infinity} a(n)/a(n+1) = 0.058621... = 2/(17+sqrt(293)) = (sqrt(293)-17)/2.
Lim_{n-> infinity} a(n+1)/a(n) = 17.058621... = (17+sqrt(293))/2 = 2/(sqrt(293)-17).
For more information about this type of recurrence follow the Khovanova link and see A054413, A086902 and A178765. - Johannes W. Meijer, Jun 12 2010

Examples

			a(4) = 17*a(3) + a(2) = 17*4964 + 291=((17+sqrt(293))/2)^4 + ((17-sqrt(293))/2)^4 = 84678.999988190 + 0.000011809 = 84679.
		

Crossrefs

Cf. A005074.
Lucas polynomials Lucas(n,m): A000032 (m=1), A002203 (m=2), A006497 (m=3), A014448 (m=4), A087130 (m=5), A085447 (m=6), A086902 (m=7), A086594 (m=8), A087798 (m=9), A086927 (m=10), A001946 (m=11), A086928 (m=12), A088316 (m=13), A090300 (m=14), A090301 (m=15), A090305 (m=16), this sequence (m=17), A090307 (m=18), A090308 (m=19), A090309 (m=20), A090310 (m=21), A090313 (m=22), A090314 (m=23), A090316 (m=24), A330767 (m=25).

Programs

  • GAP
    m:=17;; a:=[2,m];; for n in [3..20] do a[n]:=m*a[n-1]+a[n-2]; od; a; # G. C. Greubel, Dec 30 2019
  • Magma
    m:=17; I:=[2,m]; [n le 2 select I[n] else m*Self(n-1) +Self(n-2): n in [1..20]]; // G. C. Greubel, Dec 30 2019
    
  • Maple
    seq(simplify(2*(-I)^n*ChebyshevT(n, 17*I/2)), n = 0..20); # G. C. Greubel, Dec 30 2019
  • Mathematica
    LinearRecurrence[{17,1},{2,17},30] (* Harvey P. Dale, Jan 24 2018 *)
    LucasL[Range[20]-1, 17] (* G. C. Greubel, Dec 30 2019 *)
  • PARI
    vector(21, n, 2*(-I)^(n-1)*polchebyshev(n-1, 1, 17*I/2) ) \\ G. C. Greubel, Dec 30 2019
    
  • Sage
    [2*(-I)^n*chebyshev_T(n, 17*I/2) for n in (0..20)] # G. C. Greubel, Dec 30 2019
    

Formula

a(n) = 17*a(n-1) + a(n-2), starting with a(0) = 2 and a(1) = 17.
a(n) = ((17+sqrt(293))/2)^n + ((17-sqrt(293))/2)^n.
(a(n))^2 = a(2n) - 2 if n=1, 3, 5, ...
(a(n))^2 = a(2n) + 2 if n=2, 4, 6, ...
G.f.: (2-17*x)/(1-17*x-x^2). - Philippe Deléham, Nov 02 2008
From Johannes W. Meijer, Jun 12 2010: (Start)
a(2n+1) = 17*A098249(n).
a(3n+1) = A041550(5n), a(3n+2) = A041550(5n+3), a(3n+3) = 2*A041550(5n+4).
Lim_{k-> infinity} a(n+k)/a(k) = (A090306(n) + A178765(n)*sqrt(293))/2.
Lim_{n-> infinity} A090306(n)/A178765(n) = sqrt(293). (End)
a(n) = Lucas(n, 17) = 2*(-i)^n * ChebyshevT(n, 17*i/2). - G. C. Greubel, Dec 30 2019
E.g.f.: 2*exp(17*x/2)*cosh(sqrt(293)*x/2). - Stefano Spezia, Dec 31 2019

Extensions

More terms from Ray Chandler, Feb 14 2004

A005075 Sum of squares of primes = 2 mod 3 dividing n.

Original entry on oeis.org

0, 4, 0, 4, 25, 4, 0, 4, 0, 29, 121, 4, 0, 4, 25, 4, 289, 4, 0, 29, 0, 125, 529, 4, 25, 4, 0, 4, 841, 29, 0, 4, 121, 293, 25, 4, 0, 4, 0, 29, 1681, 4, 0, 125, 25, 533, 2209, 4, 0, 29, 289, 4, 2809, 4, 146, 4, 0, 845, 3481, 29, 0, 4, 0, 4, 25, 125, 0, 293, 529, 29, 5041, 4, 0, 4, 25, 4, 121, 4, 0, 29, 0, 1685, 6889, 4, 314
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Array[DivisorSum[#, #^2 &, And[PrimeQ@ #, Mod[#, 3] == 2] &] &, 85] (* Michael De Vlieger, Jul 11 2017 *)
    f[p_, e_] := If[Mod[p, 3] == 2, p^2, 0]; a[n_] := Plus @@ f @@@ FactorInteger[n]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jun 21 2022 *)
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, if (((p=f[k,1])%3) == 2, p^2)); \\ Michel Marcus, Jul 11 2017
  • Scheme
    (define (A005075 n) (if (= 1 n) 0 (+ (A000290 (if (= 2 (modulo (A020639 n) 3)) (A020639 n) 0)) (A005075 (A028234 n))))) ;; Antti Karttunen, Jul 10 2017
    

Formula

Additive with a(p^e) = p^2 if p = 2 (mod 3), 0 otherwise.
a(n) = A005063(n) - A005071(n) - 9*A079978(n). - Antti Karttunen, Jul 10 2017

Extensions

More terms from Antti Karttunen, Jul 10 2017

A005076 Sum of cubes of primes = 2 mod 3 dividing n.

Original entry on oeis.org

0, 8, 0, 8, 125, 8, 0, 8, 0, 133, 1331, 8, 0, 8, 125, 8, 4913, 8, 0, 133, 0, 1339, 12167, 8, 125, 8, 0, 8, 24389, 133, 0, 8, 1331, 4921, 125, 8, 0, 8, 0, 133, 68921, 8, 0, 1339, 125, 12175, 103823, 8, 0, 133, 4913, 8, 148877, 8, 1456, 8, 0, 24397, 205379, 133, 0, 8, 0, 8, 125, 1339, 0, 4921, 12167, 133, 357911
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Array[DivisorSum[#, #^3 &, And[PrimeQ@ #, Mod[#, 3] == 2] &] &, 71] (* Michael De Vlieger, Jul 11 2017 *)
    f[p_, e_] := If[Mod[p, 3] == 2, p^3, 0]; a[n_] := Plus @@ f @@@ FactorInteger[n]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jun 21 2022 *)
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, if (((p=f[k,1])%3) == 2, p^3)); \\ Michel Marcus, Jul 11 2017
  • Scheme
    (define (A005076 n) (if (= 1 n) 0 (+ (A000578 (if (= 2 (modulo (A020639 n) 3)) (A020639 n) 0)) (A005076 (A028234 n))))) ;; Antti Karttunen, Jul 10 2017
    

Formula

Additive with a(p^e) = p^3 if p = 2 (mod 3), 0 otherwise.
a(n) = A005064(n) - A005072(n) - 27*A079978(n). - Antti Karttunen, Jul 10 2017

Extensions

More terms from Antti Karttunen, Jul 10 2017

A005077 Sum of 4th powers of primes = 2 mod 3 dividing n.

Original entry on oeis.org

0, 16, 0, 16, 625, 16, 0, 16, 0, 641, 14641, 16, 0, 16, 625, 16, 83521, 16, 0, 641, 0, 14657, 279841, 16, 625, 16, 0, 16, 707281, 641, 0, 16, 14641, 83537, 625, 16, 0, 16, 0, 641, 2825761, 16, 0, 14657, 625, 279857, 4879681, 16, 0, 641, 83521, 16, 7890481, 16, 15266, 16, 0, 707297, 12117361, 641, 0, 16, 0, 16, 625, 14657, 0, 83537
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Array[DivisorSum[#, #^4 &, And[PrimeQ@ #, Mod[#, 3] == 2] &] &, 68] (* Michael De Vlieger, Jul 11 2017 *)
    f[p_, e_] := If[Mod[p, 3] == 2, p^4, 0]; a[n_] := Plus @@ f @@@ FactorInteger[n]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jun 21 2022 *)
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, if (((p=f[k,1])%3) == 2, p^4)); \\ Michel Marcus, Jul 11 2017
  • Scheme
    (define (A005077 n) (if (= 1 n) 0 (+ (A000583 (if (= 2 (modulo (A020639 n) 3)) (A020639 n) 0)) (A005077 (A028234 n))))) ;; Antti Karttunen, Jul 10 2017
    

Formula

Additive with a(p^e) = p^4 if p = 2 (mod 3), 0 otherwise.
a(n) = A005065(n) - A005073(n) - 81*A079978(n). - Antti Karttunen, Jul 10 2017

Extensions

More terms from Antti Karttunen, Jul 10 2017

A005090 Number of primes == 2 mod 3 dividing n.

Original entry on oeis.org

0, 1, 0, 1, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 1, 1, 1, 1, 0, 2, 0, 2, 1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 2, 1, 2, 1, 1, 0, 2, 1, 1, 1, 1, 2, 1, 0, 2, 1, 2, 0, 1, 0, 1, 1, 2, 0, 2, 1, 2, 1, 1, 0, 1, 1, 1, 1, 1, 0, 2, 0, 2, 1, 1, 2, 1, 1, 2, 1, 2, 0, 2, 0, 2, 1, 1, 0, 1, 1, 2, 1, 2, 0, 1, 1, 2, 1, 1, 0, 3, 0, 1, 1, 1, 2, 2, 0, 2, 1, 2
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Array[DivisorSum[#, 1 &, And[PrimeQ@ #, Mod[#, 3] == 2] &] &, 120] (* Michael De Vlieger, Jul 11 2017 *)
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, (f[k,1] % 3) == 2); \\ Michel Marcus, Jul 11 2017
    
  • Python
    from sympy import primefactors
    def a(n): return sum(1 for p in primefactors(n) if p%3==2)
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jul 11 2017
  • Scheme
    (define (A005090 n) (if (= 1 n) 0 (+ (A004526 (modulo (A020639 n) 3)) (A005090 (A028234 n))))) ;; Antti Karttunen, Jul 10 2017
    

Formula

Additive with a(p^e) = 1 if p = 2 (mod 3), 0 otherwise.
From Antti Karttunen, Jul 10 2017: (Start)
a(1) = 0; for n > 1, floor((A020639(n) mod 3)/2) + a(A028234(n)).
a(n) = A001221(n) - A005088(n) - A079978(n).
(End)

Extensions

More terms from Antti Karttunen, Jul 10 2017

A344908 Sum of the distinct odd-indexed prime divisors, p_{2k-1}, of n.

Original entry on oeis.org

0, 2, 0, 2, 5, 2, 0, 2, 0, 7, 11, 2, 0, 2, 5, 2, 17, 2, 0, 7, 0, 13, 23, 2, 5, 2, 0, 2, 0, 7, 31, 2, 11, 19, 5, 2, 0, 2, 0, 7, 41, 2, 0, 13, 5, 25, 47, 2, 0, 7, 17, 2, 0, 2, 16, 2, 0, 2, 59, 7, 0, 33, 0, 2, 5, 13, 67, 19, 23, 7, 0, 2, 73, 2, 5, 2, 11, 2, 0, 7, 0, 43, 83, 2, 22
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 02 2021

Keywords

Comments

a(m) = 0 for m in A066207. - Michel Marcus, Jun 12 2021
Inverse Möbius transform of n * c(n) * (pi(n) mod 2), where c(n) is the prime characteristic (A010051). - Wesley Ivan Hurt, Jun 23 2024

Examples

			a(6) = Sum_{p|6} p * (pi(p) mod 2) = 2*(pi(2) mod 2) + 3*(pi(3) mod 2) = 2*1 + 3*0 = 2.
		

Crossrefs

Cf. A344931 (sum of distinct even-indexed prime divisors).

Programs

  • Mathematica
    Table[Sum[k*Mod[PrimePi[k], 2] (PrimePi[k] - PrimePi[k - 1]) (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, if (primepi(f[k,1]) % 2, f[k,1])); \\ Michel Marcus, Jun 12 2021

Formula

a(n) = Sum_{p|n} p * (pi(p) mod 2).
G.f.: Sum_{k>=1} prime(2*k-1) * x^prime(2*k-1) / (1 - x^prime(2*k-1)). - Ilya Gutkovskiy, Oct 24 2023
a(n) = Sum_{d|n} d * c(d) * (pi(d) mod 2), where c = A010051. - Wesley Ivan Hurt, Jun 23 2024

A344931 Sum of the distinct even-indexed prime divisors, p_{2k}, of n.

Original entry on oeis.org

0, 0, 3, 0, 0, 3, 7, 0, 3, 0, 0, 3, 13, 7, 3, 0, 0, 3, 19, 0, 10, 0, 0, 3, 0, 13, 3, 7, 29, 3, 0, 0, 3, 0, 7, 3, 37, 19, 16, 0, 0, 10, 43, 0, 3, 0, 0, 3, 7, 0, 3, 13, 53, 3, 0, 7, 22, 29, 0, 3, 61, 0, 10, 0, 13, 3, 0, 0, 3, 7, 71, 3, 0, 37, 3, 19, 7, 16, 79, 0, 3, 0, 0, 10, 0, 43, 32
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 02 2021

Keywords

Comments

Inverse Möbius transform of n * c(n) * ((pi(n)+1) mod 2), where c(n) is the prime characteristic (A010051). - Wesley Ivan Hurt, Jun 23 2024

Examples

			a(12) = Sum_{p|12} p * ((pi(p)+1) mod 2) = 2*0 + 3*1 = 3.
		

Crossrefs

Cf. A000720 (pi), A008472 (sopf), A005074, A324966.
Cf. A344908 (sum of distinct odd-indexed prime divisors).

Programs

  • Mathematica
    Table[Sum[k*Mod[PrimePi[k] + 1, 2] (PrimePi[k] - PrimePi[k - 1]) (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, if (!(primepi(f[k,1]) % 2), f[k,1])); \\ Michel Marcus, Jun 12 2021

Formula

a(n) = Sum_{p|n} p * ((pi(p)+1) mod 2).
G.f.: Sum_{k>=1} prime(2*k) * x^prime(2*k) / (1 - x^prime(2*k)). - Ilya Gutkovskiy, Oct 24 2023
a(n) = Sum_{d|n} d * c(d) * ((pi(d)+1) mod 2), where c = A010051. - Wesley Ivan Hurt, Jun 23 2024
Showing 1-7 of 7 results.