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 31-40 of 46 results. Next

A029746 Numbers of the form 2^k or 7*2^k.

Original entry on oeis.org

1, 2, 4, 7, 8, 14, 16, 28, 32, 56, 64, 112, 128, 224, 256, 448, 512, 896, 1024, 1792, 2048, 3584, 4096, 7168, 8192, 14336, 16384, 28672, 32768, 57344, 65536, 114688, 131072, 229376, 262144, 458752, 524288, 917504, 1048576, 1835008, 2097152
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Sort[Flatten[{#,7#}&/@(2^Range[0,21])]] (* or *) CoefficientList[Series[ (1+2x+2x^2+3x^3)/(1-2x^2),{x,0,50}],x]  (* Harvey P. Dale, Apr 23 2011 *)
  • PARI
    a(n)=if(n<0,0,if(n<2,2^n,if(n%2,7/2,2)*2^(n\2)))

Formula

G.f.: (1+2x+2x^2+3x^3)/(1-2x^2). - Michael Somos, Nov 05 2002
Sum_{n>=0} 1/a(n) = 16/7. - Amiram Eldar, Jan 17 2022

A164285 a(n) = 7*2^n + 3.

Original entry on oeis.org

10, 17, 31, 59, 115, 227, 451, 899, 1795, 3587, 7171, 14339, 28675, 57347, 114691, 229379, 458755, 917507, 1835011, 3670019, 7340035, 14680067, 29360131, 58720259, 117440515, 234881027, 469762051, 939524099, 1879048195, 3758096387
Offset: 0

Views

Author

Vincenzo Librandi, Aug 12 2009

Keywords

Comments

Contains the primes 17, 31, 59, 227, 57347, 114691, 14680067, 7516192771,..

Examples

			At n=0, a(0)=7*2^0+3=10. At n=1, a(1)=7*2^1+3=17.
		

Programs

  • Magma
    [7*2^n+3: n in [0..40]]; // Vincenzo Librandi, Sep 12 2013
    
  • Mathematica
    CoefficientList[Series[(10 - 13 x) / ((2 x - 1) (x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 12 2013 *)
    LinearRecurrence[{3,-2},{10,17},40] (* Harvey P. Dale, Aug 29 2017 *)
  • PARI
    x='x+O('x^50); Vec((10-13*x)/((2*x-1)*(x-1))) \\ G. C. Greubel, Sep 12 2017

Formula

a(n) = 2*a(n-1) - 3.
a(n) = 3*a(n-1) - 2*a(n-2).
a(n) = A005009(n) + 3, a(0)=10.
G.f.: (10-13*x)/((2*x-1)*(x-1)).
E.g.f.: 7*exp(2*x) + 3*exp(x). - G. C. Greubel, Sep 12 2017

Extensions

Offset corrected by R. J. Mathar, Aug 19 2009

A168309 Period 2: repeat 4,-3.

Original entry on oeis.org

4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3, 4, -3
Offset: 1

Views

Author

Klaus Brockhaus, Nov 22 2009

Keywords

Comments

Interleaving of A010709 and -3*A000012.
Binomial transform of 4 followed by a signed version of A005009.
Inverse binomial transform of 4 followed by A000079.
a(n+1) - a(n) = 7*(-1)^n.
A168230 without initial term 0 gives partial sums.
Nonsimple continued fraction expansion of 2+2*sqrt(2/3) = 3.6329931618... - R. J. Mathar, Mar 08 2012

Crossrefs

Cf. A010709 (all 4's sequence), A000012 (all 1's sequence), A010727 (all 7's sequence), A168230, A005009 (7*2^n), A000079 (powers of 2).

Programs

  • Magma
    &cat[ [4, -3]: n in [1..42] ];
    [ n eq 1 select 4 else -Self(n-1)+1: n in [1..84] ];
  • Mathematica
    LinearRecurrence[{0,1},{4, -3}, 50] (* or *) Table[(1 - 7*(-1)^n)/2,{n,0,25}] (* G. C. Greubel, Jul 17 2016 *)
    PadRight[{},120,{4,-3}] (* Harvey P. Dale, Oct 20 2018 *)

Formula

a(n) = (1 - 7*(-1)^n)/2.
a(n) = -a(n-1) + 1 for n > 1; a(1) = 4.
a(n) = a(n-2) for n > 2; a(1) = 4, a(2) = -3.
G.f.: x*(4 - 3*x)/((1-x)*(1+x)).
E.g.f.: (1/2)*(-1 + exp(x))*(7 + exp(x))*exp(-x). - G. C. Greubel, Jul 17 2016

A171160 a(n) = a(n-1) + 2*a(n-2) with a(0)=3, a(1)=4.

Original entry on oeis.org

3, 4, 10, 18, 38, 74, 150, 298, 598, 1194, 2390, 4778, 9558, 19114, 38230, 76458, 152918, 305834, 611670, 1223338, 2446678, 4893354, 9786710, 19573418, 39146838, 78293674, 156587350, 313174698, 626349398, 1252698794, 2505397590, 5010795178, 10021590358
Offset: 0

Views

Author

Paul Curtz, Dec 04 2009

Keywords

Crossrefs

Programs

Formula

a(n) = (1/3)*(2*(-1)^n + 7*2^n), with n>=0. - Paolo P. Lava, Dec 14 2009
G.f.: -(x+3) / ((x+1)*(2*x-1)). - Colin Barker, Feb 10 2015
From Paul Curtz, Jun 03 2022: (Start)
a(n) = A078008(n) + A078008(n+1) + A078008(n+2).
a(n) = 2^(n+1) + A078008(n).
a(n) = A001045(n+3) - A001045(n).
(a(n) + a(n+1) = a(n+2) - a(n) = A005009(n).)
a(n) + a(n+3) = A175805(n).
a(n) = A062510(n) + A083582(n-1) with A083582(-1) = 3.
a(n) = A092297(n) + A154879(n). (End)
a(n) = 2*A062092(n-1), for n>0; 2*a(n) = A083595(n+1). - Paul Curtz, Jun 08 2022

Extensions

Edited by N. J. A. Sloane, Dec 05 2009
More terms from J. Mulder (jasper.mulder(AT)planet.nl), Jan 28 2010
More terms from Max Alekseyev, Apr 24 2010

A321483 a(n) = 7*2^n + (-1)^n.

Original entry on oeis.org

8, 13, 29, 55, 113, 223, 449, 895, 1793, 3583, 7169, 14335, 28673, 57343, 114689, 229375, 458753, 917503, 1835009, 3670015, 7340033, 14680063, 29360129, 58720255, 117440513, 234881023, 469762049, 939524095, 1879048193, 3758096383, 7516192769, 15032385535
Offset: 0

Views

Author

Paul Curtz, Nov 11 2018

Keywords

Comments

Difference table:
8, 13, 29, 55, 113, 223, 449, ...
5, 16, 26, 58, 110, 226, 446, 898, ...
11, 10, 32, 52, 116, 220, 452, 892, 1796, ...
-1, 22, 20, 64, 104, 232, 440, 904, 1784, 3592, ...
-2, 44, 40, 128, 208, 464, 880, 1808, 3568, 7184, ...
etc.
Every diagonal is a sequence of the form k*2^m.
a(n) is divisible by
. 5 if n is a term of A004767,
. 11 if n is a term of A016885,
. 13 if n is a term of A017533.

Crossrefs

Programs

  • Mathematica
    a[n_] := 7*2^n + (-1)^n ; Array[a, 32, 0] (* Amiram Eldar, Nov 12 2018 *)
    CoefficientList[Series[E^-x + 7 E^(2 x), {x, 0, 20}], x]*Table[n!, {n, 0, 20}] (* Stefano Spezia, Nov 12 2018 *)
    LinearRecurrence[{1,2},{8,13},40] (* Harvey P. Dale, Mar 18 2022 *)
  • PARI
    Vec((8 + 5*x) / ((1 + x)*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Nov 11 2018

Formula

O.g.f.: (8 + 5*x) / ((1 + x)*(1 - 2*x)). - Colin Barker, Nov 11 2018
E.g.f.: exp(-x) + 7*exp(2*x). - Stefano Spezia, Nov 12 2018
a(n) = a(n-1) + 2*a(n-2).
a(n) = 2*a(n-1) + 3*(-1)^n for n>0, a(0)=8.
a(2*k) = 7*4^k + 1, a(2*k+1) = 14*4^k - 1.
a(n) = A014551(n) + A014551(n-1) + A014551(n-2).
a(n) = 2^(n+3) - 3*A001045(n).
a(n) mod 9 = A070366(n+3).
a(n) + a(n+1) = 21*2^n.

Extensions

Two terms corrected, and more terms added by Colin Barker, Nov 11 2018

A340717 Lexicographically earliest sequence of nonnegative integers with as many distinct values as possible such that for any n >= 0, a(rev(n)) = a(n) (where rev(n) = A030101(n) corresponds to the binary reversal of n).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jan 17 2021

Keywords

Comments

The condition "with as many distinct values as possible" means here that for any distinct m and n, provided the orbits of m and n under the map x -> rev(x) do not merge, then a(m) <> a(n).

Examples

			The first terms, alongside rev(n), are:
  n   a(n)  rev(n)
  --  ----  ------
   0     0       0
   1     1       1
   2     1       1
   3     2       3
   4     1       1
   5     3       5
   6     2       3
   7     4       7
   8     1       1
   9     5       9
  10     3       5
  11     6      13
  12     2       3
  13     6      11
  14     4       7
  15     7      15
		

Crossrefs

See A340716 for similar sequences.

Programs

  • PARI
    See Links section.

Formula

a(2*n) = a(n).
a(n) = 1 iff n is a power of 2.
a(n) = 2 iff n belongs to A007283.
a(n) = 3 iff n belongs to A020714.
a(n) = 4 iff n belongs to A005009.
a(n) = 5 iff n belongs to A005010.
a(A340718(n)) = n (and this is the first occurrence of n in the sequence).

A362804 Numbers k such that the set of divisors {d | k, BitOr(k, d) = k} has an integer harmonic mean.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 24, 28, 30, 32, 45, 48, 56, 60, 64, 90, 96, 112, 120, 128, 180, 192, 224, 240, 256, 360, 384, 448, 480, 496, 512, 720, 768, 896, 960, 992, 1024, 1440, 1536, 1792, 1920, 1984, 2048, 2880, 3072, 3584, 3840, 3968, 4096, 5760, 6144, 7168, 7680
Offset: 1

Views

Author

Amiram Eldar, May 04 2023

Keywords

Comments

Equivalently, the set of divisors can be defined by {d | k, BitAnd(k, d) = d}.
Analogous to harmonic (or Ore) numbers (A001599) where the divisors d of k are restricted by BitOr(k, d) = k or BitAnd(k, d) = d.
If k is a term then so is 2*k. The primitive terms are in A362805. Thus, this sequence includes all the powers of 2 (A000079), all the numbers of the form 3*2^m and 15*2^m for m >= 1, and all the numbers of the form 7*2^m for m >= 2.
All the even perfect numbers (A000396) are terms: if k = 2^(p-1)*(2^p-1) is a perfect number (where p is a Mersenne exponent, A000043), then the only divisors of k such that BitOr(k, d) = k are 2^(p-1) and k itself, and the harmonic mean of 2^(p-1) and 2^(p-1)*(2^p-1) is 2^p - 1.
Are 1 and 45 the only odd terms in this sequence?

Crossrefs

Subsequences: A000079, A007283 \ {3}, A005009 \ {7, 14}, A110286 \ {15}, A362805.
Similar sequences: A001599, A006086, A063947, A286325, A319745.

Programs

  • Mathematica
    q[n_] := IntegerQ[HarmonicMean[Select[Divisors[n], BitAnd[n, #] == # &]]]; Select[Range[10^4], q]
  • PARI
    div(n) = select(x->(bitor(x, n) == n), divisors(n));
    is(n) = {my(d = div(n)); denominator(#d/sum(i = 1, #d, 1/d[i])) == 1;}

A213948 Triangle, by rows, generated from the INVERT transforms of (1, 1, 2, 4, 8, 16, ...).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 4, 4, 4, 1, 7, 10, 8, 8, 1, 12, 24, 20, 16, 16, 1, 20, 52, 56, 40, 32, 32, 1, 33, 112, 144, 112, 80, 64, 64, 1, 54, 238, 344, 320, 224, 160, 128, 128, 1, 88, 496, 828, 848, 640, 448, 320, 256, 256
Offset: 1

Views

Author

Gary W. Adamson, Jun 25 2012

Keywords

Comments

Row sums = A001519, the odd-indexed Fibonacci terms. The triangle is a companion to A213947, having row sums of the even-indexed Fibonacci terms.

Examples

			First few rows of the triangle are:
  1;
  1,   1;
  1,   2,   2;
  1,   4,   4,   4;
  1,   7,  20,   8,   8;
  1,  12,  24,  20,  16,  16;
  1,  20,  52,  56,  40,  32,  32;
  1,  33, 112, 144, 112,  80,  64,  64;
  1,  54, 238, 344, 320, 224, 160, 128, 128;
  1,  88, 496, 828, 848, 640, 448, 320, 256, 256;
  ...
		

Crossrefs

Cf. A001519, A213947, A000071 (2nd column), A020714 (subdiagonal), A005009 (subdiagonal).

Programs

  • Maple
    read("transforms") ;
    A213948i := proc(n,k)
        if n = 1 then
            L := [1,seq(0,i=0..k)] ;
        else
            L := [1,seq(2^i,i=0..n-2),seq(0,i=0..k)] ;
        end if;
        INVERT(L) ;
        op(k,%) ;
    end proc:
    A213948 := proc(n,k)
        if k = 1 then
            1;
        else
            A213948i(k,n)-A213948i(k-1,n) ;
        end if;
    end proc: # R. J. Mathar, Jun 30 2012

Formula

Create an array in which the n-th row is the INVERT transform of the first n terms in the sequence (1, 1, 2, 4, 8, 16, 32, ...):
1, 1, 1, 1, 1, 1,
1, 2, 3, 5, 8, 13, (essentially A000045)
1, 2, 5, 9, 18, 37, (essentially A077947)
1, 2, 5, 13, 26, 57,
Terms of the n-th row of the triangle are the finite differences downwards the n-th column of this array.

A029749 Numbers of the form 2^k times 1, 5 or 7.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 10, 14, 16, 20, 28, 32, 40, 56, 64, 80, 112, 128, 160, 224, 256, 320, 448, 512, 640, 896, 1024, 1280, 1792, 2048, 2560, 3584, 4096, 5120, 7168, 8192, 10240, 14336, 16384, 20480, 28672, 32768, 40960, 57344, 65536, 81920, 114688, 131072
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[-(3 x^4 + 3 x^3 + 4 x^2 + 2 x + 1) / (2 x^3 - 1), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 20 2013 *)

Formula

From Colin Barker, Jul 19 2013: (Start)
a(n) = 2*a(n-3) for n>4.
G.f.: -(3*x^4 + 3*x^3 + 4*x^2 + 2*x + 1) / (2*x^3 - 1). (End)
Sum_{n>=0} 1/a(n) = 94/35. - Amiram Eldar, Jan 21 2022

Extensions

More terms from Colin Barker, Jul 19 2013

A159021 a(0)=19; a(n) = a(n-1) + floor(sqrt(a(n-1))), n > 0.

Original entry on oeis.org

19, 23, 27, 32, 37, 43, 49, 56, 63, 70, 78, 86, 95, 104, 114, 124, 135, 146, 158, 170, 183, 196, 210, 224, 238, 253, 268, 284, 300, 317, 334, 352, 370, 389, 408, 428, 448, 469, 490, 512, 534, 557, 580, 604, 628, 653, 678, 704, 730, 757, 784, 812, 840, 868, 897, 926, 956, 986, 1017
Offset: 0

Views

Author

Philippe Deléham, Apr 02 2009

Keywords

Comments

Row 3 in square array A159016.
This sequence contains infinitely many squares. - Philippe Deléham, Apr 04 2009
Conjecture: The squares are of the form (7*2^k)^2 (see A005009). - Vincenzo Librandi, Apr 10 2009

Crossrefs

Programs

  • Mathematica
    NestList[#+Floor[Sqrt[#]]&,19,60] (* Harvey P. Dale, Jan 04 2013 *)

Extensions

More terms from Vincenzo Librandi, Apr 10 2009
Previous Showing 31-40 of 46 results. Next