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: Marco Piazzalunga

Marco Piazzalunga's wiki page.

Marco Piazzalunga has authored 5 sequences.

A210524 a(n) = n - sum of even digits of n.

Original entry on oeis.org

0, 1, 0, 3, 0, 5, 0, 7, 0, 9, 10, 11, 10, 13, 10, 15, 10, 17, 10, 19, 18, 19, 18, 21, 18, 23, 18, 25, 18, 27, 30, 31, 30, 33, 30, 35, 30, 37, 30, 39, 36, 37, 36, 39, 36, 41, 36, 43, 36, 45, 50, 51, 50, 53, 50, 55, 50, 57, 50, 59, 54, 55, 54, 57, 54, 59, 54, 61
Offset: 0

Author

Marco Piazzalunga, Jan 27 2013

Keywords

Comments

In even positions there are odd terms.
The difference between n and even digits of n and n has odd and even digits gives even terms finishing with 0.

Examples

			a(14) = 14 - 4 = 10.
a(28) = 28 - 2 - 8 = 18.
		

Crossrefs

Cf. A066568.

Programs

  • Mathematica
    Table[n-Total[Select[IntegerDigits[n],EvenQ]],{n,0,90}] (* Harvey P. Dale, May 20 2017 *)
  • PARI
    a(n) = {digs = digits(n, 10); return (n - sum(i=1, #digs, digs[i]*(1 - (digs[i] % 2))));} \\ Michel Marcus, Jul 15 2013

Formula

a(n) ~ n. a(n) = n mod 2. - Charles R Greathouse IV, Jan 28 2013

A210497 a(n) = 2*prime(n+1) - prime(n).

Original entry on oeis.org

4, 7, 9, 15, 15, 21, 21, 27, 35, 33, 43, 45, 45, 51, 59, 65, 63, 73, 75, 75, 85, 87, 95, 105, 105, 105, 111, 111, 117, 141, 135, 143, 141, 159, 153, 163, 169, 171, 179, 185, 183, 201, 195, 201, 201, 223, 235, 231, 231, 237, 245, 243, 261, 263, 269, 275, 273, 283
Offset: 1

Author

Marco Piazzalunga, Jan 24 2013

Keywords

Comments

The subsequence of multiples of 3 begins: 9, 15, 15, 21, 21, 27, 33, 45.
The subsequence of primes begins: 7, 43, 73, 163, 179, 223.
Some terms, like a(3)=15 or a(5)=21, are repeated twice, other terms, like a(23)=105, are repeated three times.

Examples

			a(2) = 7 because prime(3) = 5, prime(2) = 3, and 2 * 5 - 3 = 7.
a(3) = 9 because prime(4) = 7, prime(3) = 5, and 2 * 7 - 5 = 9.
a(4) = 15 because prime(5) = 11, prime(4) = 7, and 2 * 11 - 7 = 15.
		

Crossrefs

Cf. A001223, A062234, A085704 (subsequence).

Programs

  • Magma
    [2*NextPrime(p)-p: p in PrimesUpTo(300)]; // Bruno Berselli, Jan 24 2013
    
  • Mathematica
    Table[2 Prime[n + 1] - Prime[n], {n, 50}] (* Vincenzo Librandi, May 03 2015 *)
    ListConvolve[{2, -1}, Prime[Range[100]]] (* Paolo Xausa, Oct 29 2024 *)
  • PARI
    a(n)=my(p=prime(n));2*nextprime(p+1)-p \\ Charles R Greathouse IV, Jan 24 2013
    
  • Python
    from sympy import prime, nextprime
    def A210497(n): return -(p:=prime(n))+(nextprime(p)<<1) # Chai Wah Wu, Oct 29 2024

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Jan 24 2013

A209294 a(n) = (7*n^2 - 7*n + 4)/2.

Original entry on oeis.org

2, 9, 23, 44, 72, 107, 149, 198, 254, 317, 387, 464, 548, 639, 737, 842, 954, 1073, 1199, 1332, 1472, 1619, 1773, 1934, 2102, 2277, 2459, 2648, 2844, 3047, 3257, 3474, 3698, 3929, 4167, 4412, 4664, 4923, 5189, 5462
Offset: 1

Author

Marco Piazzalunga, Jan 17 2013

Keywords

Comments

a(n) is the sum of the n-th centered triangular number and n-th centered square number.
Difference of consecutive terms gives A008589 (multiples of 7).

Crossrefs

Programs

Formula

a(n) = (7*n^2 - 7*n + 4) = 7*T(n) + 2 with T = A000217.
G.f.: x*(2+3*x+2*x^2)/(1-x)^3. - Bruno Berselli, Jan 18 2013
a(n) = a(-n+1) = 3*a(n-1)-3*a(n-2)+a(n-3). - Bruno Berselli, Jan 18 2013
a(n) = 1 + A069099(n). - Omar E. Pol, Apr 27 2017
E.g.f.: ((7*x^2 + 4)*exp(x) - 4)/2. - G. C. Greubel, Jan 04 2018

A214731 a(n) = n^3 - 2*n^2 - 1.

Original entry on oeis.org

-2, -1, 8, 31, 74, 143, 244, 383, 566, 799, 1088, 1439, 1858, 2351, 2924, 3583, 4334, 5183, 6136, 7199, 8378, 9679, 11108, 12671, 14374, 16223, 18224, 20383, 22706, 25199, 27868, 30719, 33758, 36991, 40424, 44063, 47914, 51983, 56276, 60799, 65558, 70559
Offset: 1

Author

Marco Piazzalunga, Jul 27 2012

Keywords

Crossrefs

Cf. A080859, A085490, A144390 (first differences), A152619.
Similar sequences: A152015 (of the type m^3+2m^2-1), A081437 (m^3-2m^2+1).

Programs

Formula

From Bruno Berselli, Jul 27 2012: (Start)
G.f.: -x*(2-7*x-x^3)/(1-x)^4.
a(n) = A085490(n-1) + 2.
a(n) = A152619(n-2) - 1 for n>1.
a(n) - a(n-2) = A080859(n-2) - 1 for n>2. (End)
E.g.f.: 1 - (1-x)*(1+x)^2*exp(x). - G. C. Greubel, Dec 31 2023

Extensions

a(3) corrected by Charles R Greathouse IV, Jul 27 2012

A214446 n*(n^2-2*n-1).

Original entry on oeis.org

-2, -2, 6, 28, 70, 138, 238, 376, 558, 790, 1078, 1428, 1846, 2338, 2910, 3568, 4318, 5166, 6118, 7180, 8358, 9658, 11086, 12648, 14350, 16198, 18198, 20356, 22678, 25170, 27838, 30688, 33726, 36958, 40390, 44028, 47878
Offset: 1

Author

Marco Piazzalunga, Jul 18 2012

Keywords

Programs

Formula

a(n) = -2*A110427(n). G.f. 2*x*(-1+3*x+x^2) / (x-1)^4 . - R. J. Mathar, Jul 18 2012