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.

A301451 Numbers congruent to {1, 7} mod 9.

Original entry on oeis.org

1, 7, 10, 16, 19, 25, 28, 34, 37, 43, 46, 52, 55, 61, 64, 70, 73, 79, 82, 88, 91, 97, 100, 106, 109, 115, 118, 124, 127, 133, 136, 142, 145, 151, 154, 160, 163, 169, 172, 178, 181, 187, 190, 196, 199, 205, 208, 214, 217, 223, 226, 232, 235, 241, 244, 250, 253, 259, 262, 268
Offset: 1

Views

Author

Bruno Berselli, Mar 21 2018

Keywords

Comments

First bisection of A056991, second bisection of A242660.
The squares of the terms of A174396 are the squares of this sequence.

Crossrefs

Cf. A274406: numbers congruent to {0, 8} mod 9.
Cf. A193910: numbers congruent to {2, 6} mod 9.

Programs

  • GAP
    a := [1,7,10];; for n in [4..60] do a[n] := a[n-1] + a[n-2] - a[n-3]; od; a;
    
  • Magma
    &cat [[9*n+1, 9*n+7]: n in [0..40]];
    
  • Mathematica
    Table[2 (2 n - 1) + (2 n - 3 (1 - (-1)^n))/4, {n, 1, 60}]
    {#+1,#+7}&/@(9*Range[0,30])//Flatten (* or *) LinearRecurrence[{1,1,-1},{1,7,10},60] (* Harvey P. Dale, Nov 08 2020 *)
  • PARI
    Vec(x*(1 + 6*x + 2*x^2) / ((1 - x)^2*(1 + x)) + O(x^60)) \\ Colin Barker, Mar 22 2018
  • Python
    [2*(2*n-1)+(2*n-3*(1-(-1)**n))/4 for n in range(1,70)]
    
  • Sage
    [n for n in (1..300) if n % 9 in (1,7)]
    

Formula

O.g.f.: x*(1 + 6*x + 2*x^2)/((1 + x)*(1 - x)^2).
E.g.f.: (3 + 8*exp(x) - 11*exp(2*x) + 18*x*exp(2*x))*exp(-x)/4.
a(n) = a(n-1) + a(n-2) - a(n-3).
a(n) = 2*(2*n - 1) + (2*n - 3*(1 - (-1)^n))/4. Therefore, for n even a(n) = (9*n - 4)/2, otherwise a(n) = (9*n - 7)/2.
a(2n+1) = A017173(n). a(2n) = A017245(n-1). - R. J. Mathar, Feb 28 2019

A341431 a(n) is the numerator of the asymptotic density of numbers divisible by their last digit in base n.

Original entry on oeis.org

1, 1, 7, 5, 37, 7, 421, 347, 1177, 671, 14939, 6617, 135451, 140311, 271681, 143327, 5096503, 751279, 91610357, 24080311, 9098461, 830139, 2188298491, 77709491, 925316723, 6609819823, 3567606143, 10876020307, 123417992791, 300151059037, 37903472946337, 32271030591223
Offset: 2

Views

Author

Amiram Eldar, Feb 11 2021

Keywords

Examples

			The sequence of fractions begins with 1/2, 1/2, 7/12, 5/12, 37/60, 7/20, 421/840, 347/840, 1177/2520, 671/2520, 14939/27720, 6617/27720, 135451/360360, 140311/360360, ...
For n=2, the numbers divisible by their last binary digit are the odd numbers (A005408) whose density is 1/2, therefore a(2) = 1.
For n=3, the numbers divisible by their last digit in base 3 are the numbers that are congruent to {1, 2, 4} mod 6 (A047236) whose density is 1/2, therefore a(3) = 1.
For n=10, the numbers divisible by their last digit in base 10 are A034709 whose density is 1177/2520, therefore a(10) = 1177.
		

Crossrefs

Cf. A005408, A034709, A047236, A341432 (denominators).

Programs

  • Mathematica
    a[n_] := Numerator[Sum[GCD[k, n]/k, {k, 1, n - 1}]/n]; Array[a, 32, 2]

Formula

a(n)/A341432(n) = (1/n) * Sum_{k=1..n-1} gcd(k, n)/k. [corrected by Amiram Eldar, Nov 16 2022]

A341432 a(n) is the denominator of the asymptotic density of numbers divisible by their last digit in base n.

Original entry on oeis.org

2, 2, 12, 12, 60, 20, 840, 840, 2520, 2520, 27720, 27720, 360360, 360360, 720720, 720720, 12252240, 4084080, 232792560, 77597520, 33256080, 5173168, 5354228880, 356948592, 3824449200, 26771144400, 11473347600, 80313433200, 332727080400, 2329089562800, 144403552893600
Offset: 2

Views

Author

Amiram Eldar, Feb 11 2021

Keywords

Comments

a(n) divides A003418(n), and a(n) = A003418(n) for n = 1, 2, 4, 6, 8, 10, 12, ...

Examples

			For n=2, the numbers divisible by their last binary digit are the odd numbers (A005408) whose density is 1/2, therefore a(2) = 2.
For n=3, the numbers divisible by their last digit in base 3 are the numbers that are congruent to {1, 2, 4} mod 6 (A047236) whose density is 1/2, therefore a(3) = 2.
For n=10, the numbers divisible by their last digit in base 10 are A034709 whose density is 1177/2520, therefore a(10) = 2520.
		

Crossrefs

Cf. A003418, A005408, A034709, A047236, A185399, A341431 (numerators).

Programs

  • Mathematica
    a[n_] := Denominator[Sum[GCD[k, n]/k, {k, 1, n - 1}]/n]; Array[a, 32, 2]

Formula

A341431(n)/a(n) = (1/n) * Sum_{k=1..n-1} gcd(k, n)/k. [corrected by Amiram Eldar, Nov 16 2022]
a(prime(n)) = A185399(n), for n > 1.
Showing 1-3 of 3 results.