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.

Previous Showing 11-15 of 15 results.

A269266 a(n) = 2^n mod 31.

Original entry on oeis.org

1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 1
Offset: 0

Views

Author

Vincenzo Librandi, Mar 31 2016

Keywords

References

  • Continued fraction expansion of (1651+sqrt(3236405))/2386. - Bruno Berselli, Mar 31 2016

Crossrefs

Cf. A201912 (11th row of the triangle).
Cf. similar sequences of the type 2^n mod p, where p is a prime: A000034 (p=3), A070402 (p=5), A069705 (p=7), A036117 (p=11), A036118 (p=13), A062116 (p=17), A036120 (p=19), A070335 (p=23), A036122 (p=29), this sequence (p=31), A036124 (p=37), A070348 (p=41), A070349 (p=43), A070351 (p=47), A036128 (p=53), A036129 (p=59), A036130 (p=61), A036131 (p=67).

Programs

  • GAP
    List([0..70],n->PowerMod(2,n,31)); # Muniru A Asiru, Jan 30 2019
  • Magma
    [Modexp(2, n, 31): n in [0..100]];
    
  • Magma
    &cat [[1,2,4,8,16]^^20] // Bruno Berselli, Mar 31 2016
    
  • Mathematica
    PowerMod[2, Range[0, 100], 31]
  • PARI
    a(n)=2^(n%5) \\ Charles R Greathouse IV, Mar 31 2016
    
  • PARI
    x='x+O('x^99); Vec((1+2*x+4*x^2+8*x^3+16*x^4)/(1-x^5)) \\ Altug Alkan, Mar 31 2016
    
  • Python
    for n in range(0,100):print(2**n%31) # Soumil Mandal, Apr 03 2016
    
  • Python
    def A269266(n): return pow(2,n,31) # Chai Wah Wu, Jan 03 2022
    
  • Sage
    [2^mod(n,5) for n in (0..100)] # Bruno Berselli, Mar 31 2016
    

Formula

G.f.: (1 + 2*x + 4*x^2 + 8*x^3 + 16*x^4)/(1 - x^5).
a(n) = a(n-5).
a(n) = 2^(n mod 5). - Bruno Berselli, Mar 31 2016

A178233 Decimal expansion of (11+sqrt(229))/18.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, May 23 2010

Keywords

Comments

Continued fraction expansion of (11+sqrt(229))/18 is A069705.

Examples

			(11+sqrt(229))/18 = 1.45181921946786421817...
		

Crossrefs

Cf. A166125 (decimal expansion of sqrt(229)), A069705 (repeat 1, 2, 4).

A202349 Lexicographically earliest sequence such that the sequence and its first and second differences share no terms, and the 3rd differences are equal to the original sequence.

Original entry on oeis.org

1, 3, 9, 20, 39, 75, 148, 297, 597, 1196, 2391, 4779, 9556, 19113, 38229, 76460, 152919, 305835, 611668, 1223337, 2446677, 4893356, 9786711, 19573419, 39146836, 78293673, 156587349, 313174700, 626349399, 1252698795, 2505397588, 5010795177, 10021590357
Offset: 1

Views

Author

Eric Angelini, Jun 21 2016

Keywords

Comments

The sequence is completely determined by its first 3 terms. If the first terms are x, y, z, then the following terms are 2*x-3*y+3*z, 6*x-7*y+6*z, 12*x-12*y+11*z, 22*x-21*y+21*z, 42*x-41*y+42*z, 84*x-84*y+85*z, 170*x-171*y+171*z, 342*x-343*y+342*z. - Giovanni Resta, Jun 21 2016
Is it a theorem that, if x,y,z = 1,3,9, the sequence has the desired properties, or is it just a conjecture? - N. J. A. Sloane, Jun 21 2016
From Charlie Neder, Jan 10 2019: (Start)
No two terms among this sequence and its first and second differences are equal.
Proof: Representing the first and second differences by b(n) and c(n), we have that a-b is [-1, -3, -2, 1, 3, 2] with period 6, a-c is [-3, -2, -1, 3, 2, 1] with period 6, and b-c is [-2, 1, 3, 2, -1, -3] with period 6. Therefore, no two terms at the same index are equal. Since the sequence is forced to grow exponentially, only the first few terms need to be checked to confirm that no two terms at different indices are equal, proving the criterion always holds. (End)

Examples

			  1 3 9  20  39  75  148   297   597   1196
   2 6 11  19  36  73   149   300   599
    4 5   8  17  37  76   151    299
     1  3   9  20  39   75    148   <-- the starting sequence
		

Crossrefs

Cf. A024493, A130781, A069705 (inverse binomial transform assuming offset 0).
For many similar sequences, see the Index link.

Programs

  • Mathematica
    d = Differences; i = Intersection; sol = Solve[d@ d@ d@ Array[x, 50] == Array[x, 47], Array[x, 47, 4]][[1]]; a = (Array[x, 50] /. sol) /. {x[1] -> 1, x[2] -> 3, x[3] -> 9}; Print["Check = ", {i[a, d@ a], i[a, d@ d@ a], i[d@ a, d@ d@ a]}]; a (* Giovanni Resta, Jun 21 2016 *)
  • PARI
    first(n) = {n = max(n, 4); my(res = vector(n)); for(i = 1, 3, res[i] = 3^(i - 1)); for(i = 4, n, res[i] = 3 * res[i - 1] - 3 * res[i - 2] + 2 * res[i - 3]); res } \\ David A. Corneth, Jan 11 2019
    
  • PARI
    Vec(x*(1 + 3*x^2) / ((1 - 2*x)*(1 - x + x^2)) + O(x^40)) \\ Colin Barker, Jan 12 2019

Formula

From Colin Barker, Jan 11 2019: (Start)
G.f.: x*(1 + 3*x^2) / ((1 - 2*x)*(1 - x + x^2)).
a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) for n>2. (End)
a(n) = Sum_{k=0..n-1} binomial(n-1,k)*(2^k mod 7). - Fabio VisonĂ , Sep 05 2023

Extensions

a(18)-a(33) from Giovanni Resta, Jun 21 2016

A145644 Cubefree part of 10^n.

Original entry on oeis.org

1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100, 1, 10, 100
Offset: 0

Views

Author

Artur Jasinski, Oct 15 2008

Keywords

Comments

Period 3: repeat [1, 10, 100].

Crossrefs

Programs

  • Magma
    &cat [[1, 10,100]^^30]; // Wesley Ivan Hurt, Apr 18 2021
  • Mathematica
    CubefreePart[n_Integer?Positive] := Times @@ Power @@@ ({#[[1]], Mod[ #[[2]], 3]} & /@ FactorInteger[n]); Table[CubefreePart[10^n], {n, 1, 40}]
    PadRight[{}, 50, {1, 10, 100}] (* Wesley Ivan Hurt, Apr 18 2021 *)

Formula

a(n) = 10^(n mod 3) = A050985(A011557(n)) = A011557(A010872(n)). - Amiram Eldar, Feb 14 2021
From Wesley Ivan Hurt, Apr 18 2021: (Start)
G.f.: (1+10*x+100*x^2)/(1-x^3).
a(n) = a(n-3). (End)

Extensions

Offset corrected by Amiram Eldar, Feb 14 2021

A302588 a(n) = a(n-3) + 7*(n-2), a(0)=1, a(1)=2, a(2)=4.

Original entry on oeis.org

1, 2, 4, 8, 16, 25, 36, 51, 67, 85, 107, 130, 155, 184, 214, 246, 282, 319, 358, 401, 445, 491, 541, 592, 645, 702, 760, 820, 884, 949, 1016, 1087, 1159, 1233, 1311, 1390, 1471, 1556, 1642, 1730, 1822, 1915, 2010
Offset: 0

Views

Author

Paul Curtz, Jul 17 2018

Keywords

Comments

Third of a family after A000124 and A084684. Built from the second differences. The fourth sequence is 1, 2, 4, 8, 16, 32, 49, 91, ..., from periodic [1, 2, 4, 8].

References

  • 0

Crossrefs

Cf. A069705, A047350 (first differences), A130518.

Programs

  • Mathematica
    CoefficientList[ Series[-(4x^4 +x^3 +x^2 +1)/((x -1)^3 (x^2 +x +1)), {x, 0, 50}], x] (* or *)
    LinearRecurrence[{2, -1, 1, -2, 1}, {1, 2, 4, 8, 16}, 50] (* Robert G. Wilson v, Jul 18 2018 *)

Formula

Repeat the second differences of 1, 2, 4, 8, 16, i.e., repeat [1, 2, 4].
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5).
a(n) = A069705(n) + 7*A130518(n).
Previous Showing 11-15 of 15 results.