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.

A381583 Starts of runs of 3 consecutive integers that are all terms in A381581.

Original entry on oeis.org

1, 2, 20, 55, 56, 110, 304, 364, 398, 846, 1024, 1084, 1744, 1854, 2044, 2104, 2105, 2527, 2824, 2862, 3870, 4374, 5222, 5223, 5243, 5718, 5928, 6488, 6784, 6844, 6894, 6978, 7142, 7924, 10590, 11240, 11889, 11975, 12248, 14284, 14915, 16638, 17710, 17714, 17824
Offset: 1

Views

Author

Amiram Eldar, Feb 28 2025

Keywords

Comments

If k is congruent to 1 or 5 mod 12 (A087445), then A001906(k) = Fibonacci(2*k) is a term.

Examples

			1 is a term since A291711(1) = 1 divides 1, A291711(2) = 2 divides 2, and A291711(3) = 1 divides 3.
20 is a term since A291711(20) = 4 divides 20, A291711(21) = 1 divides 21, and A291711(22) = 2 divides 22.
		

Crossrefs

Subsequence of A381581 and A381582.
Subsequences: A381584, A381585.
Similar sequences: A154701, A328210, A330932, A351721.

Programs

  • Mathematica
    f[n_] := f[n] = Fibonacci[2*n]; q[n_] := q[n] = Module[{s = 0, m = n, k}, While[m > 0, k = 1; While[m > f[k], k++]; If[m < f[k], k--]; If[m >= 2*f[k], s += 2; m -= 2*f[k], s++; m -= f[k]]]; Divisible[n, s]]; seq[count_, nConsec_] := Module[{cn = q /@ Range[nConsec], s = {}, c = 0, k = nConsec + 1}, While[c < count, If[And @@ cn, c++; AppendTo[s, k - nConsec]]; cn = Join[Rest[cn], {q[k]}]; k++]; s]; seq[45, 3]
  • PARI
    mx = 20; fvec = vector(mx, i, fibonacci(2*i)); f(n) = if(n <= mx, fvec[n], fibonacci(2*n));
    is1(n) = {my(s = 0, m = n, k); while(m > 0, k = 1; while(m > f(k), k++); if(m < f(k), k--); if(m >= 2*f(k), s += 2; m -= 2*f(k), s++; m -= f(k))); !(n % s);}
    list(lim) = {my(q1 = is1(1), q2 = is1(2), q3); for(k = 3, lim, q3 = is1(k); if(q1 && q2 && q3, print1(k-2, ", ")); q1 = q2; q2 = q3);}

A381584 Starts of runs of 4 consecutive integers that are all terms in A381581.

Original entry on oeis.org

1, 55, 2104, 5222, 24784, 63510, 64264, 69487, 95463, 121393, 184327, 327303, 374589, 463110, 468168, 561069, 572550, 596868, 671407, 740310, 759030, 819948, 902670, 956680, 1023009, 1036230, 1065030, 1259817, 1274910, 1359552, 1683154, 1714470, 1731750, 2182023
Offset: 1

Views

Author

Amiram Eldar, Feb 28 2025

Keywords

Comments

If k is congruent to 1 or 5 mod 12 (A087445), then A001906(k) = Fibonacci(2*k) is a term.

Examples

			1 is a term since A291711(1) = 1 divides 1, A291711(2) = 2 divides 2, A291711(3) = 1 divides 3, and A291711(4) = 2 divides 4.
55 is a term since A291711(55) = 1 divides 55, A291711(56) = 2 divides 56, A291711(57) = 3 divides 57, and A291711(58) = 2 divides 58.
		

Crossrefs

Subsequence of A381581, A381582 and A381583.
A381585 is a subsequence.
Similar sequences: A141769, A328211, A328215, A330933.

Programs

  • Mathematica
    f[n_] := f[n] = Fibonacci[2*n]; q[n_] := q[n] = Module[{s = 0, m = n, k}, While[m > 0, k = 1; While[m > f[k], k++]; If[m < f[k], k--]; If[m >= 2*f[k], s += 2; m -= 2*f[k], s++; m -= f[k]]]; Divisible[n, s]]; seq[count_, nConsec_] := Module[{cn = q /@ Range[nConsec], s = {}, c = 0, k = nConsec + 1}, While[c < count, If[And @@ cn, c++; AppendTo[s, k - nConsec]]; cn = Join[Rest[cn], {q[k]}]; k++]; s]; seq[12, 4]
  • PARI
    mx = 20; fvec = vector(mx, i, fibonacci(2*i)); f(n) = if(n <= mx, fvec[n], fibonacci(2*n));
    is1(n) = {my(s = 0, m = n, k); while(m > 0, k = 1; while(m > f(k), k++); if(m < f(k), k--); if(m >= 2*f(k), s += 2; m -= 2*f(k), s++; m -= f(k))); !(n % s);}
    list(lim) = {my(q1 = is1(1), q2 = is1(2), q3 = is1(3), q4); for(k = 4, lim, q4 = is1(k); if(q1 && q2 && q3 && q4, print1(k-3, ", ")); q1 = q2; q2 = q3; q3 = q4);}

A087444 Numbers that are congruent to {1, 4} mod 9.

Original entry on oeis.org

1, 4, 10, 13, 19, 22, 28, 31, 37, 40, 46, 49, 55, 58, 64, 67, 73, 76, 82, 85, 91, 94, 100, 103, 109, 112, 118, 121, 127, 130, 136, 139, 145, 148, 154, 157, 163, 166, 172, 175, 181, 184, 190, 193, 199, 202, 208, 211, 217, 220, 226, 229, 235, 238, 244, 247, 253
Offset: 1

Views

Author

Paul Barry, Sep 04 2003

Keywords

Comments

3*a(n) is conjectured to be the total number of sides (straight double bonds (long side) and single bond (short side)) of a certain equilateral triangle expansion shown in one of the links. The pattern is supposed to become the planar Archimedean net 3.3.3.3.6 when n -> infinity. 3*a(n) is also conjectured to be the total number of sided (bonds) in another version of an equilateral triangle expansion that is supposed to become the planar Archimedean net 3.6.3.6. See the illustrations in the links. - Kival Ngaokrajang, Nov 30 2014

Crossrefs

Programs

  • Mathematica
    Select[Range[300],MemberQ[{1,4},Mod[#,9]]&] (* or *) LinearRecurrence[ {1,1,-1},{1,4,10},60] (* Harvey P. Dale, Jan 22 2019 *)
  • PARI
    a(n) = (18*n - 17 - 3*(-1)^n)/4 \\ David Lovler, Aug 20 2022

Formula

G.f.: x*(1+3*x+5*x^2)/((1+x)*(1-x)^2).
E.g.f.: 5 + ((9*x - 17/2)*exp(x) - (3/2)*exp(-x))/2.
a(n) = (18*n - 17 - 3*(-1)^n)/4.
a(n) = 9*n - a(n-1) - 13 (with a(1)=1). - Vincenzo Librandi, Aug 08 2010

Extensions

Kival Ngaokrajang's comment reworded by Wolfdieter Lang, Dec 05 2014
E.g.f. and formula adapted to offset by David Lovler, Aug 20 2022

A087446 Numbers that are congruent to {1, 6} mod 15.

Original entry on oeis.org

1, 6, 16, 21, 31, 36, 46, 51, 61, 66, 76, 81, 91, 96, 106, 111, 121, 126, 136, 141, 151, 156, 166, 171, 181, 186, 196, 201, 211, 216, 226, 231, 241, 246, 256, 261, 271, 276, 286, 291, 301, 306, 316, 321, 331, 336, 346, 351, 361, 366, 376, 381, 391, 396, 406
Offset: 1

Views

Author

Paul Barry, Sep 04 2003

Keywords

Comments

3*a(n) is conjectured to be the number of edges (bonds) visited when walking around the boundary of a certain equilateral triangle construction at the n-th iteration. See the illustration in the link. Note that isthmus edges (bridges) are counted twice. The pattern is supposed to become the planar Archimedean net 3.12.12 when n -> infinity. - Kival Ngaokrajang, Nov 30 2014

Crossrefs

Programs

  • Mathematica
    #+{1,6}&/@(15*Range[0,30])//Flatten (* or *) LinearRecurrence[{1,1,-1},{1,6,16},60] (* Harvey P. Dale, Dec 05 2018 *)

Formula

G.f.: x*(1 + 5*x + 9*x^2)/((1 + x)*(1 - x)^2).
E.g.f.: (30*x-1)*exp(x)/4 + 5*exp(-x)/4.
a(n) = (18*n-1)/4 + 5*(-1)^n/4.
a(n) = 15*n - a(n-1) - 23, with a(1)=1. - Vincenzo Librandi, Aug 08 2010

Extensions

Editing: rewording of Kival Ngaokrajang's comment. - Wolfdieter Lang, Dec 06 2014

A228137 Numbers that are congruent to {1, 4} mod 12.

Original entry on oeis.org

1, 4, 13, 16, 25, 28, 37, 40, 49, 52, 61, 64, 73, 76, 85, 88, 97, 100, 109, 112, 121, 124, 133, 136, 145, 148, 157, 160, 169, 172, 181, 184, 193, 196, 205, 208, 217, 220, 229, 232, 241, 244, 253, 256, 265, 268, 277, 280, 289, 292, 301, 304, 313, 316, 325
Offset: 1

Views

Author

Colin Barker, Aug 12 2013

Keywords

Comments

The squares of the terms of A001651 are the squares of this sequence. - Bruno Berselli, Aug 12 2013

Crossrefs

Programs

  • Mathematica
    Select[Range[300], MemberQ[{1, 4}, Mod[#, 12]] &] (* Amiram Eldar, Dec 28 2021 *)
  • PARI
    Vec(x*(8*x^2+3*x+1)/((x-1)^2*(x+1)) + O(x^99))

Formula

a(n) = -13/2 - 3*(-1)^n/2 + 6*n.
a(n) = a(n-1) + a(n-2) - a(n-3).
G.f.: x*(8*x^2+3*x+1) / ((x-1)^2*(x+1)).
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(3)+3)*Pi/36 + log(2)/4 - sqrt(3)*log(26-15*sqrt(3))/36. - Amiram Eldar, Dec 28 2021
E.g.f.: 8 + ((12*x - 13)*exp(x) - 3*exp(-x))/2. - David Lovler, Sep 04 2022

A174398 Numbers that are congruent to {1, 4, 5, 8} mod 12.

Original entry on oeis.org

1, 4, 5, 8, 13, 16, 17, 20, 25, 28, 29, 32, 37, 40, 41, 44, 49, 52, 53, 56, 61, 64, 65, 68, 73, 76, 77, 80, 85, 88, 89, 92, 97, 100, 101, 104, 109, 112, 113, 116, 121, 124, 125, 128, 133, 136, 137, 140, 145, 148, 149, 152, 157, 160, 161, 164, 169, 172, 173
Offset: 1

Views

Author

Gary Detlefs, Mar 18 2010

Keywords

Comments

Numbers k such that k*(k + 3)/4 + (k + 1)*(k + 2)/6 or k*(5*k + 3)/12 + 1/3 is a nonnegative integer. - Bruno Berselli, Feb 14 2017

Crossrefs

Programs

  • Magma
    [n : n in [0..200] | n mod 12 in [1, 4, 5, 8]]; // Wesley Ivan Hurt, Jun 07 2016
  • Maple
    seq(3*n +(-1)^floor(n/2), n=0..50);
  • Mathematica
    Table[(1+I)*(3*(n-n*I+I-1)+I^(1-n)-I^n)/2, {n, 60}] (* Wesley Ivan Hurt, Jun 07 2016 *)
    Select[Range[200],MemberQ[{1,4,5,8},Mod[#,12]]&] (* or *) LinearRecurrence[ {2,-2,2,-1},{1,4,5,8},60] (* Harvey P. Dale, Aug 02 2020 *)

Formula

a(n) = 3*n - 3 + (-1)^floor((n-1)/2).
From Wesley Ivan Hurt, Jun 07 2016: (Start)
G.f.: x*(1 + 2*x - x^2 + 4*x^3)/((1 - x)^2*(1 + x^2)).
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
a(n) = (1 + i)*(3*(n - n*i + i - 1) + i^(1-n) - i^n)/2, where i=sqrt(-1).
a(2*k) = A092259(k), a(2*k-1) = A087445(k). (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/6 + log(2)/2. - Amiram Eldar, Dec 31 2021

A259614 Numbers congruent to {17,29} mod 36.

Original entry on oeis.org

17, 29, 53, 65, 89, 101, 125, 137, 161, 173, 197, 209, 233, 245, 269, 281, 305, 317, 341, 353, 377, 389, 413, 425, 449, 461, 485, 497, 521, 533, 557, 569, 593, 605, 629, 641, 665, 677, 701, 713, 737, 749, 773, 785, 809, 821, 845, 857, 881, 893, 917, 929, 953
Offset: 1

Views

Author

Bob Selcoe, Jun 30 2015

Keywords

Comments

Subsequence of A087445.
Let terms in this sequence be T:
Collatz sequences (C) that contain no T must terminate at 1.
Define C containing at least one T as C(T), and let T(i) {i=1..z} be T in order of appearance in C(T).
All T(i) i>=2 have odd preimages congruent to either {1,5} mod 12 or {11,19} mod 24. Preimages of the second type (P2) are congruent to B mod 2^m (m>=4), where B is a set of numbers with a predictable recurrence pattern (a bit cumbersome to describe here) starting with A259663(n,2), i.e., {11, 19, 3, 35, 99, 483, ...}. All P2 lead to T(i) == A002450((m-2)/2) mod 2^(m-1) when m is even, and T(i) == A072197((m-3)/2) mod 2^(m-1) when m is odd. So, for example, T(i) == 1 mod 8 when P2 == 11 mod 16; T(i) == 13 mod 16 when P2 == 19 mod 32; T(i) == 5 mod 32 when P2 == 3 mod 64; T(i) == 53 mod 64 when P2 == 35 mod 128; etc.
If the Collatz conjecture is true (i.e., all C terminate at 1), then all C(T) contain T(z) after which all subsequent odd terms decrease and are congruent to {1,5} mod 12 that are not congruent to {17,29} mod 36. The first few T(z) are {17, 53, 341, 1109, 1205, ...}. So, for example, the trajectory of odd terms in C with initial term 950 is [475, 713, 535, 803, 1205, 113, 85, 1], where T(1) = 713 and T(2) = T(z) = 1205. In this example, P2 = 803 because 803 == 11 mod 24.

Crossrefs

Programs

  • Magma
    [ n : n in [1..1000] | n mod 36 in [17, 29] ] // Vincenzo Librandi Jul 01 2015
  • Mathematica
    Select[Range[1000], MemberQ[{17, 29}, Mod[#, 36]] &] (* Vincenzo Librandi, Jul 01 2015 *)

Formula

G.f.: x*(17+12*x+7*x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Jul 26 2015
E.g.f.: 7 + (18*x - 4)*exp(x) - 3*exp(-x). - David Lovler, Sep 10 2022

A364602 Triangle T(n,k) with rows of length 2*n-1, generated by T(1,1)=0, T(n,1)=T(n-1,1)+2, T(n,2)=4*(n-1)-1, and for k>=3, T(n,k)=4*T(n-1,k-2)+1.

Original entry on oeis.org

0, 2, 3, 1, 4, 7, 9, 13, 5, 6, 11, 17, 29, 37, 53, 21, 8, 15, 25, 45, 69, 117, 149, 213, 85, 10, 19, 33, 61, 101, 181, 277, 469, 597, 853, 341, 12, 23, 41, 77, 133, 245, 405, 725, 1109, 1877, 2389, 3413, 1365, 14, 27, 49, 93, 165, 309, 533, 981, 1621, 2901
Offset: 1

Views

Author

Ruud H.G. van Tol, Jul 29 2023

Keywords

Comments

The sequence is a permutation of all integers >= 0.
Each row of T contains n*2-1 terms; the terms in column k increase by 2^k.
T(1,1) = 0; T(2,2) = 3.
T(2,1) = T(1,1)+2 = 2; T(2,3) = 4*T(1,1)+1 = 1 ("knight jump").
In the context of the 3x+1 problem, when a term x is used to represent the odd 4*x+1, its successor is 3*x+1, and k-1 is the 2-adic valuation of 3*x+1.
Right diagonal is A002450.
The terms at the top of the columns are A096773(k), or (2^(k-1)*(3 + 2*(-1)^k) - 1)/3.
When the table is analytically continued upwards by subtracting 2^k, the first layer of values are -A255138(k), or -(2^k*(3 + 2*(-1)^k) + 1)/3.

Examples

			Triangle T(n,k) begins:
n/k 1| 2| 3| 4|  5|  6|  7|  8|  9| 10| 11|
1|  0
2|  2  3  1
3|  4  7  9 13   5
4|  6 11 17 29  37  53  21
5|  8 15 25 45  69 117 149 213  85
6| 10 19 33 61 101 181 277 469 597 853 341
7| 12 ...
		

Crossrefs

Programs

  • PARI
    my(N=8, v=Vec([0, 2, 3, 1], N^2), p=4); for(n=3, N, my(K=2*n-1); for(k=1, K, v[p+k]=if(k<=2, v[p-K+k+2]+2^k, 4*v[p-K+k]+1)); p+=K); v
    
  • PARI
    T(n, k) = 2^k*(n-(6*k+3-(-1)^k)/12)-1/3;
    
  • PARI
    n_of_x(x) = my(n=0); while(1==x%4, x>>=2; n++); n + if(x%2,(x+1)/4,  x/2) + 1;
    
  • PARI
    k_of_x(x) = valuation(3*x+1,2) + 1;

Formula

For n>1, T(n,k) = T(n-1,k) + 2^k, so T(n,1) = 2*(n-1).
T(n,2) = 4*(n-1)-1 = 2*T(n,1)-1, so T(2,2) = 3.
For n>1 and k>2, T(n,k) = 4*T(n-1,k-2)+1, so T(2,3) = 1.
For i>=0, a(i^2+1) = T(i+1,1).
T(n, k) = 2^k * (n - (6*k + 3 - (-1)^k)/12) - 1/3.
T(n,1) == 0 (mod 2); T(n,2) == 3 (mod 4); T(n,k>=3) == 1 (mod 4).
k = v2(3*T(n,k)+1) + 1, where v2(x) = A007814(x) is the 2-adic valuation of x.
Showing 1-8 of 8 results.