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-5 of 5 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

A079131 Primes such that iterated sum-of-digits (A038194) is odd.

Original entry on oeis.org

3, 5, 7, 19, 23, 37, 41, 43, 59, 61, 73, 79, 97, 109, 113, 127, 131, 149, 151, 163, 167, 181, 199, 223, 239, 241, 257, 271, 277, 293, 307, 311, 313, 331, 347, 349, 367, 379, 383, 397, 401, 419, 421, 433, 439, 457, 487, 491, 509, 523, 541, 547, 563, 577, 599
Offset: 1

Views

Author

Klaus Brockhaus, Dec 28 2002

Keywords

Comments

Subsequence of primes of A187318. - Michel Marcus, Jun 08 2015
Primes congruent to 1, 3, 5, 7 mod 18. - Robert Israel, Jun 08 2015

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(600) | p mod 18 in [1,3,5,7]]; // Vincenzo Librandi, Jun 07 2015
    
  • Magma
    [a: n in [0..1000] | IsPrime(a) where a is Floor(9*n/5)]; // Vincenzo Librandi, Jun 08 2015
  • Maple
    select(isprime, [3, seq(seq(i*18+j, j=[1,5,7]),i=0..100)]); # Robert Israel, Jun 08 2015
  • Mathematica
    Select[Prime[Range[120]], OddQ[Mod[#, 9]] &] (* Bruno Berselli, Aug 31 2012 *)
  • PARI
    forprime(p=2,600,if((p%9)%2==1,print1(p,",")))
    

A187349 Rank transform of the sequence floor(9n/5); complement of A187348.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 20, 23, 24, 27, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 49, 51, 54, 56, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 78, 80, 82, 85, 87, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 107, 109, 111, 113, 116, 117, 119, 121, 123, 125
Offset: 1

Views

Author

Clark Kimberling, Mar 08 2011

Keywords

Comments

See A187224.

Crossrefs

Programs

  • Mathematica
    seqA=Table[Floor[9n/5], {n, 1, 220}] (* A187318 *)
    seqB=Table[n, {n, 1, 220}]; (* A000027 *)
    jointRank[{seqA_, seqB_}]:={Flatten@Position[#1, {, 1}], Flatten@Position[#1, {, 2}]}&[Sort@Flatten[{{#1, 1}&/@seqA, {#1, 2}&/@seqB}, 1]];
    limseqU=FixedPoint[jointRank[{seqA, #1[[1]]}]&, jointRank[{seqA, seqB}]][[1]] (* A187349 *)
    Complement[Range[Length[seqA]], limseqU] (* A187350 *)
    (* by Peter J. C. Moses, Mar 07 2011 *)

A262770 A Beatty sequence: a(n)=floor(n*p) where p=2*cos(Pi/7)=A160389.

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 10, 12, 14, 16, 18, 19, 21, 23, 25, 27, 28, 30, 32, 34, 36, 37, 39, 41, 43, 45, 46, 48, 50, 52, 54, 55, 57, 59, 61, 63, 64, 66, 68, 70, 72, 73, 75, 77, 79, 81, 82, 84, 86, 88, 90, 91, 93, 95, 97, 99, 100, 102, 104, 106, 108, 109, 111, 113, 115, 117, 118, 120, 122, 124, 126, 127, 129, 131, 133, 135, 136, 138, 140, 142, 144, 145, 147, 149, 151, 153, 154, 156, 158, 160, 162, 163, 165, 167, 169, 171, 172, 174, 176, 178, 180, 181, 183, 185, 187, 189, 191
Offset: 0

Views

Author

Patrick D McLean, Sep 30 2015

Keywords

Comments

Beatty sequence of the shorter diagonal (A160389) in a regular heptagon with sidelength 1.
Complement of Beatty sequence A262773 of the longer diagonal (A231187) in a regular heptagon with sidelength 1.
First 106 terms agree with A187318, but A187318(106)=190 while A262770(106)=191.

Crossrefs

Complement of A262773.
Initially agrees with A187318 (because 2*cos(Pi/7) is close to 9/5).

Programs

  • Mathematica
    Table[Floor[2 n Cos[Pi/7]], {n, 0, 106}] (* Michael De Vlieger, Oct 05 2015 *)
  • Octave
    p=roots([1,-1,-2,1])(1); a(n)=floor(p*n)
    
  • PARI
    a(n) = floor(n*2*cos(Pi/7)); \\ Michel Marcus, Oct 05 2015

A272915 a(n) = n + floor(5*n/6).

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 11, 12, 14, 16, 18, 20, 22, 23, 25, 27, 29, 31, 33, 34, 36, 38, 40, 42, 44, 45, 47, 49, 51, 53, 55, 56, 58, 60, 62, 64, 66, 67, 69, 71, 73, 75, 77, 78, 80, 82, 84, 86, 88, 89, 91, 93, 95, 97, 99, 100, 102, 104, 106, 108, 110, 111, 113, 115, 117, 119
Offset: 0

Views

Author

Bruno Berselli, Jun 15 2016

Keywords

Comments

Equivalently, numbers congruent to {0, 1, 3, 5, 7, 9} mod 11.
In general, n + floor((k-1)*n/k) provides the numbers congruent to {0, 1, 3, 5, ..., 2*k-3} mod (2*k-1) for k>1.

Crossrefs

Cf. similar sequences with formula n+floor((k-1)*n/k): A032766 (k=2), A047220 (k=3), A047392 (k=4), A187318 (k=5).

Programs

  • Magma
    [n+Floor(5*n/6): n in [0..70]];
  • Mathematica
    Table[n + Floor[5 n/6], {n, 0, 70}]
  • Maxima
    makelist(n+floor(5*n/6), n, 0, 70);
    
  • PARI
    vector(70, n, n--; n+floor(5*n/6))
    
  • Python
    [n+int(5*n/6) for n in range(70)]
    
  • Sage
    [n+floor(5*n/6) for n in range(70)];
    

Formula

G.f.: x*(1 + 2 x + 2 x^2 + 2 x^3 + 2 x^4 + 2 x^5)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5)).
a(n) = a(n-1) + a(n-6) - a(n-7).
a(6*k + r) = 11*k + 2*r - (1 - (-1)^a(r))/2, with r = 0..5.
Showing 1-5 of 5 results.