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 21-30 of 30 results.

A345290 a(n) is obtained by replacing 2^k in binary expansion of n with Fibonacci(-k-2).

Original entry on oeis.org

0, -1, 2, 1, -3, -4, -1, -2, 5, 4, 7, 6, 2, 1, 4, 3, -8, -9, -6, -7, -11, -12, -9, -10, -3, -4, -1, -2, -6, -7, -4, -5, 13, 12, 15, 14, 10, 9, 12, 11, 18, 17, 20, 19, 15, 14, 17, 16, 5, 4, 7, 6, 2, 1, 4, 3, 10, 9, 12, 11, 7, 6, 9, 8, -21, -22, -19, -20, -24
Offset: 0

Views

Author

Rémy Sigrist, Jun 13 2021

Keywords

Comments

This sequence is a variant of A022290; here we consider Fibonacci numbers with negative indices (A039834), there Fibonacci numbers with positive indices (A000045).
After the initial 0, the sequence alternates runs of positive terms and runs of negative terms, the k-th run having 2^(k-1) terms.

Examples

			For n = 3:
- 3 = 2^1 + 2^0,
- so a(3) = A039834(2+1) + A039834(2+0) = 2 - 1 = 1.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (v=0, e); while (n, n-=2^e=valuation(n, 2); v+=fibonacci(-2-e)); v }

Formula

a(n) = A022290(A063695(n)) - A022290(A063694(n)).
a(n) = A022290(n) iff n belongs to A062880.
a(n) = -A022290(n) iff n belongs to A000695.
a(n) = 0 iff n = 0.
a(n) = 1 iff n belongs to A072197.
a(n) = 2 iff n belongs to A080675.
a(n) = -1 iff n belongs to A020989.
a(n) = -2 iff n belongs to A136412.

A099730 Array read by antidiagonals. Rows contain odd numbers reaching same odd successor in Collatz function iteration.

Original entry on oeis.org

1, 5, 3, 21, 13, 7, 85, 53, 29, 9, 341, 213, 117, 37, 11, 1365, 853, 469, 149, 45, 15, 5461, 3413, 1877, 597, 181, 61, 17, 21845, 13653, 7509, 2389, 725, 245, 69, 19, 87381, 54613, 30037, 9557, 2901, 981, 277, 77, 23
Offset: 1

Views

Author

Lambert Klasen (lambert.klasen(AT)gmx.de), Nov 09 2004

Keywords

Comments

All numbers that end in 3 will begin with numbers from previous row (for example, 3413 is 341&3). - Jean-Bernard François, Sep 09 2013
The sequence is a permutation of the odd positive integers. - Bob Selcoe, Jul 26 2015

Examples

			t(1, 2) = 53 = 4*13+1, t(2, 5) = 7509 = 4*1877+1.
Array begins:
1 5 21 85 341 1365 5461 21845 87381 ...
3 13 53 213 853 3413 13653 54613 218453 ...
7 29 117 469 1877 7509 30037 120149 480597 ...
9 37 149 597 2389 9557 38229 152917 611669 ...
11 45 181 725 2901 11605 46421 185685 742741 ...
15 61 245 981 3925 15701 62805 251221 1004885 ...
17 69 277 1109 4437 17749 70997 283989 1135957 ...
19 77 309 1237 4949 19797 79189 316757 1267029 ...
...
Construct array by writing odd numbers in columns, taking first overflow after two steps and then an overflow each fourth step (for each column).
		

Crossrefs

First row = A002450 (except leading zero), second row = A072197, third row = A072261.

Programs

  • Mathematica
    t[n_, k_] := 2^(2*(k + 1) - 1)*(n + Quotient[n + 1, 3]) + (4^(k + 1) - 1)/3; Table[t[n - k, k], {n, 0, 8}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Sep 09 2013, after Maon Wenders *)
  • PARI
    g(n)=(n+1)\3
    T(n,k)=2^(2*(k+1)-1)*(n+g(n))+(4^(k+1)-1)/3
    for(i=0,20,for(j=0,10,print1(T(i,j), ", "));print())\\ Maon Wenders, Jul 15 2012

Formula

Let g(n)= floor((n+1)/3), then T(n,k) = 2^(2*(k+1)-1) *(n+g(n)) + (4^(k+1)-1)/3. - Maon Wenders, Jul 15 2012
t(n, k) = 4*t(n, k-1) + 1. - Jean-Bernard François, Sep 09 2013

A172143 a(n) = (A172126(n) - 1)/3.

Original entry on oeis.org

0, 1, 3, 5, 13, 21, 28, 53, 85, 113, 213, 227, 341, 453, 853, 909, 1365, 1813, 1820, 3413, 3637, 5461, 7253, 7281, 13653, 14549, 14563, 21845, 29013, 29125, 54613, 58197, 58253, 87381, 116053, 116501, 116508, 218453, 232789, 233013, 349525, 464213, 466005, 466033
Offset: 1

Views

Author

Ralf Stephan, Nov 19 2010

Keywords

Comments

Conjecture: sequence consists of an infinite number of subsequences S(m,0) = A172241(n) = (1/18)[8^n-(-1)^n-9], m>0, S(m,n+1) = 4*S(m,n)+1. The first subsequences
S(1,n) = A002450(n) = (4^n-1)/3 = 0, 1, 5, 21, 85, ...,
S(2,n) = A072197(n) = (10*4^n-1)/3 = 3, 13, 53, 213, ...,
S(3,n) = (85*4^n-1)/3 = 28, 113, 453, ...,
S(4,n) = (682*4^n-1)/3 = 227, 909, 3637, ..., and generally,
S(m,n) = [(3*A172241(m) + 1) * 4^n - 1]/3.

Crossrefs

Programs

  • Mathematica
    seq[max_] := Module[{kmax = Floor[Log[4, 3*max+1]], s = {}, s1, odd},Do[odd = (4^k-1)/3; s1 = 2^Range[0, Floor[Log2[max/odd]]] * odd; s = Join[s, s1], {k, 1, kmax}]; Select[(Union[s] - 1)/3, IntegerQ]]; seq[10^7] (* Amiram Eldar, Sep 01 2024 *)
  • PARI
    for(n=1, 300000, o=3*n/2^valuation(n, 2)+1; b=ispower(o); if(b&&b%2==0&&round(sqrtn(o, b/2))==4&&(n-1)%3==0, print1((n-1)/3, ", ")))

Extensions

More terms from Amiram Eldar, Sep 01 2024

A172447 a(n) = (-1 + 5*2^(2*n + 1) - 3*n)/9.

Original entry on oeis.org

1, 4, 17, 70, 283, 1136, 4549, 18202, 72815, 291268, 1165081, 4660334, 18641347, 74565400, 298261613, 1193046466, 4772185879, 19088743532, 76354974145, 305419896598, 1221679586411, 4886718345664, 19546873382677, 78187493530730, 312749974122943, 1250999896491796
Offset: 0

Views

Author

Paul Curtz, Feb 03 2010

Keywords

Comments

a(n) mod 10 gives the 10-periodic sequence 1, 4, 7, 0, 3, 6, 9, 2, 5, 8 (and repeat, A131579 shifted, A144468 reversed) which contains all ten digits, that has a "palindromic" symmetry: 1 + 8 = 4 + 5 = 7 + 2 = 0 + 9 = 3 + 6 = 9.
The inverse binomial transform gives 1, 3, 10, 30, 90, ... (A062107 shifted). - R. J. Mathar, Feb 11 2010

Crossrefs

Cf. A072197 (first differences).

Programs

  • Magma
    [(-1+5*2^(2*n+1)-3*n)/9: n in [0..30]]; // Vincenzo Librandi, Aug 05 2011
    
  • Mathematica
    LinearRecurrence[{6, -9, 4}, {1, 4, 17}, 30] (* Harvey P. Dale, Mar 25 2016 *)
    ((-1 + 5 2^(2# + 1) - 3#)/9  &) /@ Range[0, 29] (* Alonso del Arte, Apr 25 2020 *)
  • PARI
    a(n)=(10*4^n-3*n)\9 \\ Charles R Greathouse IV, Jul 21 2015
    
  • Scala
    val powerOf2: LazyList[BigInt] = LazyList.iterate(1: BigInt)(_ * 2)
    (0 to 29).map(n => (-1 + 5 * powerOf2(2 * n + 1) - 3 * n)/9) // Alonso del Arte, Apr 25 2020

Formula

a(n) = 6*a(n - 1) - 9*a(n - 2) + 4*a(n - 3).
a(n + 1) - 4*a(n) = n.
a(n) = A172416(2n + 1).
G.f.: (1 - 2*x + 2*x^2)/((1 - 4*x) * (x - 1)^2). - R. J. Mathar, Feb 11 2010
E.g.f.: (10*exp(4*x) - (1 + 3*x)*exp(x))/9. - G. C. Greubel, Nov 02 2018

Extensions

Definition replaced by closed formula by R. J. Mathar, Feb 11 2010

A206444 Least n such that L(n)<-1 and L(n)A206284, and a(1)=13.

Original entry on oeis.org

13, 53, 213, 853, 3413, 13653, 54613, 218453, 873813, 3495253
Offset: 1

Views

Author

Clark Kimberling, Feb 07 2012

Keywords

Comments

A206074 gives an ordering {p(n,x)} of the polynomials with coefficients in {0,1}. The least n for which p(n,x) has a root r less than -1 is 13, hence the choice of 13 as the initial term of A206443. (Specifically, p(13,x)=1+x^2+x^3, and r=-1.46557...) The next p(n,x) having a root less than -1 and
The first 10 terms of A206444 are also the 2nd through 11th terms of A072197.

Crossrefs

Programs

  • Mathematica
    highs := {First /@ #, Most[FoldList[Plus, 1, Length /@ #]]} &[Split[Rest[FoldList[Max, -\[Infinity], #]]]] &
    f[polyInX_] := {Min[#], Max[#]} &[
      Map[#[[1]] &, DeleteCases[Map[{#, Head[#]} &, Chop[N[x /. Solve[polyInX == 0, x], 40]]], {_, Complex}]]]
    t = Table[IntegerDigits[n, 2], {n, 1, 100000}];
    b[n_] := Reverse[Array[x^(# - 1) &, {n + 1}]]
    p[n_] := t[[n]].b[-1 + Length[t[[n]]]]
    Table[p[n], {n, 1, 25}]
    fitCriterion = Intersection[Map[#[[1]] &, DeleteCases[
           Table[{n, Boole[IrreduciblePolynomialQ[p[n]]]}, {n, 1, #}], {_, 0}]], Map[#[[1]] &, DeleteCases[
           Table[{n, CountRoots[#, {x, -Infinity, 0}] -
           CountRoots[#, {x, -1, 0}] &[p[n]]}, {n, 1, #}],
               {_, 0}]]] &[Length[t]];
    polyNum = Map[{f[p[#]][[1]], #} &, fitCriterion];
    up = Map[polyNum[[#]] &, highs[Map[#[[1]] &, polyNum]][[2]]]
    down = Map[polyNum[[#]] &, highs[Map[#[[1]] &, -polyNum]][[2]]]
    Table[up[[k, 2]], {k, 1, Length[up]}]      (* A206443 *)
    Table[down[[k, 2]], {k, 1, Length[down]}]  (* A206444 *)
    (* Peter J. C. Moses, Feb 06 2012 *)

Extensions

a(8)-a(10) from Robert G. Wilson v, Feb 11 2012

A072196 Multiples of 3 which on one operation of the Collatz function T (N -> 3N+1/2^r) yield the number 5.

Original entry on oeis.org

3, 213, 13653, 873813, 55924053, 3579139413, 229064922453, 14660155037013, 938249922368853, 60047995031606613, 3843071682022823253, 245956587649460688213, 15741221609565484045653, 1007438183012190978921813, 64476043712780222650996053, 4126466797617934249663747413, 264093875047547791978479834453
Offset: 1

Author

N. Rathankar (rathankar(AT)yahoo.com), Jul 03 2002

Keywords

Examples

			(3*3+1)/2=5, (3*213+1)/2^7=5, etc. Thus multiples of 3 act as generators on the numbers in the Collatz domain.
		

Crossrefs

Programs

Formula

a(n) = (10*64^(n-1)-1)/3. - Henry Bottomley, Dec 02 2002 [Formula adapted to a change of offset by Georg Fischer, Apr 10 2024]

Extensions

More terms from Henry Bottomley, Dec 02 2002

A113049 Triangle of sums of Jacobsthal numbers related to binomial(4n,n)/(3n+1) mod 4.

Original entry on oeis.org

3, 11, 13, 43, 45, 53, 171, 173, 181, 213, 683, 685, 693, 725, 853, 2731, 2733, 2741, 2773, 2901, 3413, 10923, 10925, 10933, 10965, 11093, 11605, 13653, 43691, 43693, 43701, 43733, 43861, 44373, 46421, 54613, 174763, 174765, 174773, 174805, 174933
Offset: 0

Author

Paul Barry, Oct 11 2005

Keywords

Comments

First column is A007583(n+1). Main diagonal is A072197. Conjecture: A113048(n)=2 only if n=T(i,j).

Examples

			Rows begin
3;
11, 13;
43, 45, 53;
171, 173, 181, 213;
683, 685, 693, 725, 683;
2731,2733, 2741, 2773, 2901, 3413;
		

Formula

T(n, k)=if(k<=n, J(2n+3)+2J(2k), 0), J(n)=A001045(n).

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

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

A082983 Odd numbers which lead to 1 in the 3x+1 problem, generated by a particular "least-first" greedy algorithm (see program code).

Original entry on oeis.org

1, 5, 3, 13, 17, 11, 7, 9, 21, 29, 19, 25, 33, 37, 45, 49, 53, 35, 23, 15, 61, 65, 43, 57, 69, 77, 51, 81, 85, 93, 101, 67, 89, 59, 39, 113, 75, 117, 133, 141, 149, 99, 157, 173, 115, 153, 177, 181, 197, 131, 87, 205, 209, 139, 185, 123, 213, 229, 237, 241, 245, 163, 217
Offset: 0

Author

Howard A. Landman, May 28 2003

Keywords

Comments

It is suspected but not proved that all odd integers are in the sequence - this is equivalent to whether all numbers reach 1 in the 3x+1 problem. The program code given below does not actually represent infinite sets, but the result is the same since the smallest remaining member of each sibling-set is always present.

Examples

			The second term is 5 because if we take m = 1 (our starting point), generate all numbers m * 2^k, k >= 1, subtract 1 and divide by 3 for those which give an integer result, we get the set {5,21,85, ...} (sequence A002450), which we call the "children" of 1, and 5 is the smallest member of that set. Next we replace 5 in the set by 5's children {3,13,53,213, ...} (sequence A072197), forming a new working set of generated numbers that are not yet in the sequence. The next term is 3 because the smallest member is 3. 3 has no children, so we simply remove 3 from the working set and the next term is 13. [Edited by _Peter Munn_, Jun 20 2021]
		

Crossrefs

Programs

  • Perl
    @list = ( 1 );
    while (1) {
        $n = shift @list;
        print "$n ";
        # next sibling
        push(@list,4*$n + 1);
        # first child
        if (($n % 3) == 1) {
            $n = ($n*4 - 1)/3;
            while ($n && (($n % 2) == 0)) { $n /= 2; }
            push(@list,$n) unless ($n <= 1);
        } elsif (($n % 3) == 2) {
            $n = ($n*2 - 1)/3;
            while ($n && (($n % 2) == 0)) { $n /= 2; }
            push(@list,$n) unless ($n <= 1);
        }
        #else do nothing, since == 0 mod 3 has no children
        # Inefficient - should have heap insertion sort.
        @list = sort numeric @list;
    }
    sub numeric { $a <=> $b; }

A354170 Odd numbers whose Collatz trajectory includes 11 odd numbers.

Original entry on oeis.org

57, 59, 115, 119, 229, 237, 461, 465, 473, 477, 507, 513, 917, 931, 943, 945, 947, 949, 971, 987, 1015, 1025, 1027, 1031, 1129, 1131, 1845, 1857, 1861, 1867, 1881, 1887, 1891, 1893, 1905, 1909, 1943, 1945, 1953, 1975, 2029, 2051, 2053, 2055, 2059, 2063, 2073
Offset: 1

Author

Krishna Kumar Arumugam, May 18 2022

Keywords

Examples

			119 is a term since its Collatz trajectory is 119, 358, 179, 538, 269, 808, 404, 202, 101, 304, 152, 76, 38, 19, 58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 29, 10, 5, 16, 8, 4, 2, 1, which has 11 odd numbers.
		

Crossrefs

Programs

Formula

{ A005408 } intersect { A072466 }. - Alois P. Heinz, May 18 2022
Previous Showing 21-30 of 30 results.