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-8 of 8 results.

A164765 Partial sums of [A080782^2].

Original entry on oeis.org

1, 10, 14, 30, 66, 91, 140, 221, 285, 385, 529, 650, 819, 1044, 1240, 1496, 1820, 2109, 2470, 2911, 3311, 3795, 4371, 4900, 5525, 6254, 6930, 7714, 8614, 9455, 10416, 11505, 12529, 13685, 14981, 16206, 17575, 19096, 20540, 22140, 23904, 25585
Offset: 1

Views

Author

Carl R. White, Aug 25 2009

Keywords

Comments

Yet another plausible solution to A115603.
The first differences of A115603 are all squares (assuming a prior term of 0), meaning that any sequence beginning 1,3,2,4 is sufficient to account for them; This solution chooses the permutation of integers A080782 = {1,3,2,4,6,5,7,9,8,...}
Ultimately that means this sequence is equal to A000330 for every two out of three consecutive terms, and is greater by 2n+1 where different.

Crossrefs

Original puzzle: A115603; Used in this solution: A080782, A000330; Other solutions: A115391, A116955, A162899

Programs

  • Mathematica
    Accumulate[Array[#+Mod[#+1,3]&,70,0]^2] (* Harvey P. Dale, Mar 29 2013 *)
  • PARI
    Vec(x*(1 + 8*x - 5*x^2 + 10*x^3 + 4*x^4 - x^5 + x^6) / ((1 - x)^4*(1 + x + x^2)^2) + O(x^40)) \\ Colin Barker, Aug 03 2020

Formula

a(n) = ( n(n+1) + 6 - 8*sin^2(Pi*(n+1)/3) )*(2n+1)/6.
a(n) = Sum_{k=0..n} A080782(k)^2.
From Colin Barker, Aug 03 2020: (Start)
G.f.: x*(1 + 8*x - 5*x^2 + 10*x^3 + 4*x^4 - x^5 + x^6) / ((1 - x)^4*(1 + x + x^2)^2).
a(n) = 2*a(n-1) - a(n-2) + 2*a(n-3) - 4*a(n-4) + 2*a(n-5) - a(n-6) + 2*a(n-7) - a(n-8) for n>8.
(End)

A064429 a(n) = floor(n / 3) * 3 + sign(n mod 3) * (3 - n mod 3).

Original entry on oeis.org

0, 2, 1, 3, 5, 4, 6, 8, 7, 9, 11, 10, 12, 14, 13, 15, 17, 16, 18, 20, 19, 21, 23, 22, 24, 26, 25, 27, 29, 28, 30, 32, 31, 33, 35, 34, 36, 38, 37, 39, 41, 40, 42, 44, 43, 45, 47, 46, 48, 50, 49, 51, 53, 52, 54, 56, 55, 57, 59, 58, 60, 62, 61, 63, 65, 64, 66, 68, 67, 69, 71, 70
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 15 2001

Keywords

Comments

a(a(n)) = n (a self-inverse permutation).
Take natural numbers, exchange trisections starting with 1 and 2.
Lodumo_3 of A080425. - Philippe Deléham, Apr 26 2009
From Franck Maminirina Ramaharo, Jul 27 2018: (Start)
The sequence is A008585 interleaved with A016789 and A016777.
a(n) is also obtained as follows: write n in base 3; if the rightmost digit is '1', then replace it with '2' and vice versa; convert back to decimal. For example a(14) = a('11'2') = '11'1' = 13 and a(10) = a('10'1') = '10'2' = 11. (End)
A permutation of the nonnegative integers partitioned into triples [3*k-3, 3*k-1, 3*k-2] for k > 0. - Guenther Schrack, Feb 05 2020

Examples

			From _Franck Maminirina Ramaharo_, Jul 27 2018: (Start)
Interleave 3 sequences:
A008585: 0.....3.....6.....9.......12.......15........
A016789: ..2.....5.....8.....11.......14.......17.....
A016777: ....1.....4.....7......10.......13.......16..
(End)
		

Crossrefs

Programs

  • GAP
    a:=[0,2,1,3];; for n in [5..100] do a[n]:=a[n-1]+a[n-3]-a[n-4]; od; a; # Muniru A Asiru, Jul 27 2018
    
  • Magma
    [2*n - 3 - 3*((n-2) div 3): n in [0..80]]; // Vincenzo Librandi, Aug 05 2018
  • Maple
    A064429:=n->2*n-3-3*floor((n-2)/3): seq(A064429(n), n=0..100); # Wesley Ivan Hurt, Nov 30 2013
  • Mathematica
    Table[2 n - 3 - 3 Floor[(n - 2)/3], {n, 0, 100}] (* Wesley Ivan Hurt, Nov 30 2013 *)
    {#+1,#-1,#}[[Mod[#,3,1]]]&/@Range[0, 100] (* Federico Provvedi, May 11 2021 *)
    LinearRecurrence[{1,0,1,-1},{0,2,1,3},80] (* or *) {#[[1]],#[[3]],#[[2]]}&/@Partition[Range[0,80],3]//Flatten (* Harvey P. Dale, Mar 28 2025 *)
  • PARI
    a(n) = 2*n-3-3*((n-2)\3); \\ Altug Alkan, Oct 06 2017
    

Formula

a(n) = A080782(n+1) - 1.
a(n) = n - 2*sin(4*Pi*n/3)/sqrt(3). - Jaume Oliver Lafont, Dec 05 2008
a(n) = A001477(n) + A102283(n). - Jaume Oliver Lafont, Dec 05 2008
a(n) = lod_3(A080425(n)). - Philippe Deléham, Apr 26 2009
G.f.: x*(2 - x + 2*x^2)/((1 + x + x^2)*(1 - x)^2 ). - R. J. Mathar, Feb 20 2011
a(n) = 2*n - 3 - 3*floor((n-2)/3). - Wesley Ivan Hurt, Nov 30 2013
a(n) = a(n-1) + a(n-3) - a(n-4) for n > 3. - Wesley Ivan Hurt, Oct 06 2017
E.g.f.: x*exp(x) + (2*sin((sqrt(3)*x)/2))/(exp(x/2)*sqrt(3)). - Franck Maminirina Ramaharo, Jul 27 2018
From Guenther Schrack, Feb 05 2020: (Start)
a(n) = a(n-3) + 3 with a(0)=0, a(1)=2, a(2)=1 for n > 2;
a(n) = n + (w^(2*n) - w^n)*(1 + 2*w)/3 where w = (-1 + sqrt(-3))/2. (End)
Sum_{n>=1} (-1)^n/a(n) = log(2)/3. - Amiram Eldar, Jan 31 2023

A092486 Take natural numbers, exchange first and third quadrisection.

Original entry on oeis.org

3, 2, 1, 4, 7, 6, 5, 8, 11, 10, 9, 12, 15, 14, 13, 16, 19, 18, 17, 20, 23, 22, 21, 24, 27, 26, 25, 28, 31, 30, 29, 32, 35, 34, 33, 36, 39, 38, 37, 40, 43, 42, 41, 44, 47, 46, 45, 48, 51, 50, 49, 52, 55, 54, 53, 56, 59, 58, 57, 60, 63, 62, 61, 64, 67, 66, 65, 68, 71, 70, 69, 72
Offset: 0

Views

Author

Ralf Stephan, Apr 04 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Partition[Range[80],4]/.{a_,b_,c_,d_}->{c,b,a,d}] (* Harvey P. Dale, Aug 12 2012 *)
  • PARI
    { f="b092486.txt"; for (n=0, 5000, a0=4*n + 3; a1=a0 - 1; a2=a1 - 1; a3=a0 + 1; write(f, 4*n, " ", a0); write(f, 4*n+1, " ", a1); write(f, 4*n+2, " ", a2); write(f, 4*n+3, " ", a3); ); } \\ Harry J. Smith, Jun 21 2009

Formula

G.f.: (3-4*x+3*x^2)/((1+x^2)*(1-x)^2).
a(4n) = 4n+3, a(4n+1) = 4n+2, a(4n+2) = 4n+1, a(4n+3) = 4n+4.
a(n) = n+1+i^n+(-i)^n, where i is the imaginary unit. - Bruno Berselli, Feb 08 2011
From Wesley Ivan Hurt, May 09 2021: (Start)
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4).
a(n) = 1 + n + 2*cos(n*Pi/2). (End)
Sum_{n>=0} (-1)^n/a(n) = log(2) (A002162). - Amiram Eldar, Nov 28 2023

A079357 a(1)=1; a(n)=a(n-1)-1 if n is already in the sequence, a(n)=a(n-1)+4 otherwise.

Original entry on oeis.org

1, 5, 9, 13, 12, 16, 20, 24, 23, 27, 31, 30, 29, 33, 37, 36, 40, 44, 48, 47, 51, 55, 54, 53, 57, 61, 60, 64, 63, 62, 61, 65, 64, 68, 72, 71, 70, 74, 78, 77, 81, 85, 89, 88, 92, 96, 95, 94, 98, 102, 101, 105, 104, 103, 102, 106, 105, 109, 113, 112, 111, 110, 109, 108, 107
Offset: 1

Views

Author

Benoit Cloitre, Feb 14 2003

Keywords

Comments

If, in the defining recurrence, the rule a(n)=a(n-1)+4 when n is not already in the sequence is generalized to a(n)=a(n-1)+k, then the resulting sequence ultimately becomes periodic with period 1,3,10,35 for k=1,2,3,4, respectively. - John W. Layman, Apr 15 2003

Crossrefs

Formula

It appears that, for n >= 219, a(n)=n+b(n) where b(n) is the period-35 sequence (-1, 2, 5, 3, 6, 9, 7, 5, 8, 11, 9, 12, 10, 8, 6, 9, 7, 10, 13, 11, 9, 7, 5, 3, 1, -1, -3, -5, -7, -9, -11, -13, -10, -7, -4).

Extensions

More terms from John W. Layman, Apr 15 2003

A375336 For n>=4, irregular triangular array of successive integer solutions to sqrt((d-c)*b^2 + c*(b+1)^2) for square integers d = n^2, where b and c are positive integers and c < d, read by rows.

Original entry on oeis.org

5, 7, 7, 8, 9, 13, 17, 27, 8, 10, 11, 13, 16, 19, 10, 11, 13, 14, 19, 21, 25, 31, 59, 61, 12, 15, 22, 23, 29, 34, 39, 42, 11, 13, 14, 16, 17, 19, 25, 33, 37, 41, 49, 103, 107, 125, 13, 14, 16, 17, 19, 20, 23, 27, 28, 32, 37, 40, 46, 53, 82, 83, 15, 18, 21, 26
Offset: 4

Views

Author

Charles L. Hohn, Aug 12 2024

Keywords

Comments

Provable that every row n has a finite number of terms, with n < 4 producing no solutions, and T(n, k) never exceeding (n/2)^3.
This sequence excludes cases where c == 0, where all b produce integer solutions d*b.
Nonsquare d produce solutions following a different pattern, shown as A374602.

Examples

			4: {5, 7}
5: {7, 8}
6: {9, 13, 17, 27}
7: {8, 10, 11, 13, 16, 19}
8: {10, 11, 13, 14, 19, 21, 25, 31, 59, 61}
9: {12, 15, 22, 23, 29, 34, 39, 42}
10: {11, 13, 14, 16, 17, 19, 25, 33, 37, 41, 49, 103, 107, 125}
11: {13, 14, 16, 17, 19, 20, 23, 27, 28, 32, 37, 40, 46, 53, 82, 83}
12: {15, 18, 21, 26, 29, 31, 34, 41, 43, 51, 54, 57, 61, 71, 159, 165, 209, 211}
...
sqrt((2^2-1)*1^2 + 1*(1+1)^2) = sqrt(7) -> not an integer so not included.
sqrt((4^2-1)*1^2 + 1*(1+1)^2) = sqrt(19) -> not an integer so not included.
sqrt((4^2-3)*1^2 + 3*(1+1)^2) = 5 -> T(4,1).
sqrt((4^2-11)*1^2 + 11*(1+1)^2) = 7 -> T(4,2).
sqrt((5^2-8)*1^2 + 8*(1+1)^2) = 7 -> T(5,1).
sqrt((6^2-5)*2^2 + 5*(2+1)^2) = 13 -> T(6,2).
		

Crossrefs

Programs

  • PARI
    row(n)=my(d=n^2, t=n, v=List()); while(t
    				

Formula

T(n, 1) = A080782(n+2).

A324080 a(n) is the rarest values appearing recorded in n-th pair in A324078.

Original entry on oeis.org

1, 1, 3, 3, 2, 2, 3, 2, 4, 4, 4, 4, 2, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 6, 5, 7, 7, 7, 7, 7, 7, 7, 3, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 5
Offset: 1

Views

Author

Joerg Arndt, Feb 15 2019

Keywords

Comments

Dropping all but the first occurrence of the terms appears to give A080782.

Crossrefs

See A324081 for the multiplicities.

Formula

a(n) = A324078(2*n-1).
a(n) = A324079(2*n).

A324081 a(n) is the multiplicity of the rarest values appearing recorded in n-th pair in A324078.

Original entry on oeis.org

1, 3, 1, 2, 1, 2, 3, 4, 1, 2, 3, 4, 6, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 9, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 1, 2, 3, 4, 5
Offset: 1

Views

Author

Joerg Arndt, Feb 15 2019

Keywords

Comments

Dropping all but the first occurrence of the terms appears to give A080782.

Crossrefs

See A324080 for the corresponding rarest values.

Formula

a(n) = A324078(2*n).
a(n) = A324079(2*n-1).

A080783 a(1)=1, a(n)=a(n-1)-1 if n is already in the sequence, a(n)=a(n-1)+5 otherwise.

Original entry on oeis.org

1, 6, 11, 16, 21, 20, 25, 30, 35, 40, 39, 44, 49, 54, 59, 58, 63, 68, 73, 72, 71, 76, 81, 86, 85, 90, 95, 100, 105, 104, 109, 114, 119, 124, 123, 128, 133, 138, 137, 136, 141, 146, 151, 150, 155, 160, 165, 170, 169, 174, 179, 184, 189, 188, 193, 198
Offset: 1

Views

Author

Benoit Cloitre, Mar 07 2003

Keywords

Crossrefs

Programs

  • Mathematica
    lst={1};i=2;Do[If[MemberQ[lst,i],AppendTo[lst,Last[lst]-1], AppendTo[ lst,Last[lst]+5]];i++,{60}];lst (* Harvey P. Dale, Aug 20 2011 *)

Formula

Conjectured to be asymptotic to 3n as n -> infinity.
Showing 1-8 of 8 results.