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.

A131579 Period 10: repeat 0, 3, 6, 9, 2, 5, 8, 1, 4, 7.

Original entry on oeis.org

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

Views

Author

Paul Curtz, Oct 02 2007

Keywords

Comments

a(n) = last digit of 3*n, n >= 0. a(n+7) = last digit of 3*n + 1, n >= 0, and a(n+4) = last digit of 3*n + 2, n >= 0. The last digit of -3*n = A144468(n), n >= 0, the last one of -3*n + 1 = A144468(n+3), n >= 0 and the last one of -3*n + 2 = A144468(n+6), n >= 0. - Wolfdieter Lang, Aug 14 2017

Crossrefs

Programs

  • Magma
    &cat[[0,3,6,9,2,5,8,1,4,7]^^10]; // Vincenzo Librandi, Aug 15 2017
  • Mathematica
    PadRight[{}, 120, {0, 3, 6, 9, 2, 5, 8, 1, 4, 7}] (* Vincenzo Librandi, Aug 15 2017 *)

Formula

a(n) = A008585(n) mod 10. - Bruno Berselli, Mar 08 2011
G.f.: -x*(3 + 6*x + 9*x^2 + 2*x^3 + 5*x^4 + 8*x^5 + x^6 + 4*x^7 + 7*x^8) / ( (x-1) *(1+x) *(x^4 + x^3 + x^2 + x + 1) *(x^4 - x^3 + x^2 - x + 1) ). - R. J. Mathar, Mar 10 2011
Decimal expansion of 41028683/1111111110 . - R. J. Mathar, Jul 06 2025

A172447 a(n) = (-1 + 5*2^(2*n + 1) - 3*n)/9.

Original entry on oeis.org

1, 4, 17, 70, 283, 1136, 4549, 18202, 72815, 291268, 1165081, 4660334, 18641347, 74565400, 298261613, 1193046466, 4772185879, 19088743532, 76354974145, 305419896598, 1221679586411, 4886718345664, 19546873382677, 78187493530730, 312749974122943, 1250999896491796
Offset: 0

Views

Author

Paul Curtz, Feb 03 2010

Keywords

Comments

a(n) mod 10 gives the 10-periodic sequence 1, 4, 7, 0, 3, 6, 9, 2, 5, 8 (and repeat, A131579 shifted, A144468 reversed) which contains all ten digits, that has a "palindromic" symmetry: 1 + 8 = 4 + 5 = 7 + 2 = 0 + 9 = 3 + 6 = 9.
The inverse binomial transform gives 1, 3, 10, 30, 90, ... (A062107 shifted). - R. J. Mathar, Feb 11 2010

Crossrefs

Cf. A072197 (first differences).

Programs

  • Magma
    [(-1+5*2^(2*n+1)-3*n)/9: n in [0..30]]; // Vincenzo Librandi, Aug 05 2011
    
  • Mathematica
    LinearRecurrence[{6, -9, 4}, {1, 4, 17}, 30] (* Harvey P. Dale, Mar 25 2016 *)
    ((-1 + 5 2^(2# + 1) - 3#)/9  &) /@ Range[0, 29] (* Alonso del Arte, Apr 25 2020 *)
  • PARI
    a(n)=(10*4^n-3*n)\9 \\ Charles R Greathouse IV, Jul 21 2015
    
  • Scala
    val powerOf2: LazyList[BigInt] = LazyList.iterate(1: BigInt)(_ * 2)
    (0 to 29).map(n => (-1 + 5 * powerOf2(2 * n + 1) - 3 * n)/9) // Alonso del Arte, Apr 25 2020

Formula

a(n) = 6*a(n - 1) - 9*a(n - 2) + 4*a(n - 3).
a(n + 1) - 4*a(n) = n.
a(n) = A172416(2n + 1).
G.f.: (1 - 2*x + 2*x^2)/((1 - 4*x) * (x - 1)^2). - R. J. Mathar, Feb 11 2010
E.g.f.: (10*exp(4*x) - (1 + 3*x)*exp(x))/9. - G. C. Greubel, Nov 02 2018

Extensions

Definition replaced by closed formula by R. J. Mathar, Feb 11 2010

A237042 UPC check digit for n.

Original entry on oeis.org

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

Views

Author

Alonso del Arte, Feb 02 2014

Keywords

Comments

The UPC check digit is calculated much like a base 10 digital root, except that the digits in the ones place, hundreds place, ten thousands place, etc., are multiplied by 3, before the final step of multiplying the whole sum by -1 prior to taking it modulo 10. Thus the UPC check digit gives the impression of advancing in steps of 7 with each increment of 1 except most of the times when the last digit of n goes from 9 to 0.

Examples

			a(13) = 0 because 1 * 1 + 3 * 3 = 10, giving a check digit of 0.
a(14) = 7 because 1 * 1 + 4 * 3 = 13, and -13 = 7 mod 10.
a(15) = 4 because 1 * 1 + 5 * 3 = 16, and -16 = 4 mod 10.
		

References

  • David Salomon, Coding for Data and Computer Communications. New York: Springer (2006): 41 - 42.

Crossrefs

Programs

  • PARI
    a(n) = vecsum(digits(n,100)*31\-10) % 10; \\ Kevin Ryde, Oct 03 2023

Formula

a(n) = -( (Sum_{i=1..floor(L/2)} d(2i-1)) + 3*(Sum_{j=0..floor(L/2)} d(2j)) ) mod 10, where L is how many digits n has, d(L - 1) is the most significant digit of n, ..., and d(0) is the ones place digit.
Showing 1-3 of 3 results.