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.

User: Joseph Myers

Joseph Myers's wiki page.

Joseph Myers has authored 323 sequences. Here are the ten most recent ones:

A279766 Number of odd digits in the decimal expansions of integers 1 to n.

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 45, 46, 48, 49, 51, 52, 54, 55, 57, 58, 60, 60, 61, 61, 62, 62, 63, 63, 64, 64
Offset: 0

Author

Joseph Myers, Dec 18 2016

Keywords

Comments

From Bernard Schott, Feb 19 2023: (Start)
Problem 1 of the British Mathematical Olympiad, round 1, in 2016/2017 asked: when the integers 1, 2, 3, ..., 2016 are written down in base 10, how many of the digits in the list are odd? The answer is a(2016) = 4015.
The similar sequence but with number of even digits is A358854. (End)

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0, a(n-1)+
          nops(select(x-> x::odd, convert(n,base,10))))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 22 2016
  • Mathematica
    Table[Count[Flatten@ IntegerDigits@ Range[0, n], d_ /; OddQ@ d], {n, 0, 68}] (* or *)
    Accumulate@ Table[Count[IntegerDigits@ n, d_ /; OddQ@ d], {n, 0, 68}] (* Michael De Vlieger, Dec 22 2016 *)

Formula

a(n) = A196564(A007908(n)). - Michel Marcus, Dec 18 2016
a(n) = A117804(n+1) - A358854(n) (number of total digits - number of even digits). - Bernard Schott, Feb 19 2023

A279259 Smallest positive integer m such that m, m+1, m+2, m+3 are divisible by 2n+1, 2n+3, 2n+5, 2n+7 respectively.

Original entry on oeis.org

53, 159, 1735, 4508, 3222, 18238, 31499, 16965, 78013, 114722, 54348, 225124, 303425, 133515, 519187, 662408, 277794, 1035370, 1272023, 515697, 1864393, 2228174, 880920, 3112528, 3642317, 1412343, 4901599, 5641460, 2154030, 7368982, 8368163, 3155229, 10667605, 11980538
Offset: 0

Author

Joseph Myers, Dec 08 2016

Keywords

Examples

			53 is the smallest positive integer such that 53, 54, 55, 56 are divisible by 1, 3, 5, 7 respectively, hence a(0) = 53. - _Bernard Schott_, Dec 08 2020
		

Programs

  • Mathematica
    LinearRecurrence[{0,0,5,0,0,-10,0,0,10,0,0,-5,0,0,1},{53,159,1735,4508,3222,18238,31499,16965,78013,114722,54348,225124,303425,133515,519187},40] (* Harvey P. Dale, Dec 29 2017 *)

Formula

a(n) = (2*n+1 + lcm(2*n+1, 2*n+3, 2*n+5, 2*n+7))/2.
G.f.: (8*x^14 +10*x^12 -89*x^11 -153*x^10 -1777*x^9 -4173*x^8 -2445*x^7 -9489*x^6 -9563*x^5 -2427*x^4 -4243*x^3 -1735*x^2 -159*x-53) / ((x-1)^5*(x^2+x+1)^5). - Alois P. Heinz, Dec 08 2016
From Bernard Schott, Dec 08 2020: (Start)
If n == 1 (mod 3), a(n) = (2*n+1)* ((2*n+3)*(2*n+5)*(2*n+7)/3 + 1)/2.
If n == 0, 2 (mod 3), a(n) = (2*n+1)* ((2*n+3)*(2*n+5)*(2*n+7) + 1)/2. (End)

A277608 Least number of fractions of the form (k+1)/k, for k a positive integer, whose product equals n.

Original entry on oeis.org

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

Author

Joseph Myers, Oct 23 2016

Keywords

Comments

If each intermediate product of the first j of the fractions, for all j < a(n), is also restricted to be an integer, the resulting sequence is A117497. The first n for which a shorter product can be obtained by allowing intermediate non-integer products is 43 = 2/1 * 2/1 * 2/1 * 2/1 * 2/1 * 4/3 * 129/128, a product of 7 fractions, where A117497(43) = 8.

Crossrefs

Cf. A117497 (restriction to intermediate products being integers), A014701 (always generating n from n-1 for n odd and from n/2 for n even), A376012.

A264998 Number of partitions of n into distinct parts of the form 3^a*5^b or 2.

Original entry on oeis.org

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

Author

Joseph Myers, Nov 29 2015

Keywords

Examples

			15 = 15 = 9 + 5 + 1 = 9 + 3 + 2 + 1, so a(15) = 3.
		

Crossrefs

Programs

  • Haskell
    import Data.MemoCombinators (memo2, list, integral)
    a264998 n = a264998_list !! (n-1)
    a264998_list = f 0 [] (1 : 2 : tail a003593_list) where
       f u vs ws'@(w:ws) | u < w = (p' vs u) : f (u + 1) vs ws'
                         | otherwise = f u (vs ++ [w]) ws
       p' = memo2 (list integral) integral p
       p _  0 = 1
       p [] _ = 0
       p (k:ks) m = if m < k then 0 else p' ks (m - k) + p' ks m
    -- Reinhard Zumkeller, Dec 18 2015
  • Mathematica
    nmax = 100; A003593 = Select[Range[nmax], PowerMod[15, #, #] == 0 &]; CoefficientList[Series[(1 + x^2) * Product[(1 + x^(A003593[[k]])), {k, 1, Length[A003593]}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Dec 18 2015 *)

Formula

G.f.: (1+x)(1+x^2)(1+x^3)(1+x^5)(1+x^9)(1+x^15)....

A264997 Number of partitions of n into distinct parts of the form 3^a*5^b.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 0, 1, 2, 1, 0, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 0, 1, 2, 2, 1, 2, 3, 2, 3, 2, 2, 3, 2, 2, 2, 2, 1, 2, 3, 2, 3, 3, 2, 4, 3, 1, 3, 3, 3, 3, 3, 3, 4, 4, 2, 4, 3, 2, 4, 3, 2, 2, 2, 2, 2, 2, 2, 3, 4, 2, 3, 4, 2, 5, 5, 3, 4, 4, 4, 5, 4, 2, 6, 6, 3, 5
Offset: 0

Author

Joseph Myers, Nov 29 2015

Keywords

Examples

			28 = 27 + 1 = 25 + 3 = 15 + 9 + 3 + 1, so a(28) = 3.
		

Crossrefs

Programs

  • Haskell
    import Data.MemoCombinators (memo2, list, integral)
    a264997 n = a264997_list !! (n-1)
    a264997_list = f 0 [] a003593_list where
       f u vs ws'@(w:ws) | u < w = (p' vs u) : f (u + 1) vs ws'
                         | otherwise = f u (vs ++ [w]) ws
       p' = memo2 (list integral) integral p
       p _  0 = 1
       p [] _ = 0
       p (k:ks) m = if m < k then 0 else p' ks (m - k) + p' ks m
    -- Reinhard Zumkeller, Dec 18 2015
  • Mathematica
    nmax = 100; A003593 = Select[Range[nmax], PowerMod[15, #, #] == 0 &]; CoefficientList[Series[Product[(1 + x^(A003593[[k]])), {k, 1, Length[A003593]}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Dec 01 2015 *)

Formula

G.f.: (1+x)(1+x^3)(1+x^5)(1+x^9)(1+x^15)....

A227715 Triangle read by rows: Number of 2n-step self-avoiding walks on diamond lattice ending at point with x = 2k.

Original entry on oeis.org

1, 4, 4, 28, 24, 16, 188, 188, 128, 64, 1428, 1368, 1120, 640, 256, 10708, 10572, 8864, 6208, 3072, 1024, 82948, 81376, 71572, 53376, 32768, 14336, 4096, 644788, 637148, 570512, 453424, 304640, 166912, 65536, 16384, 5067404, 5007560, 4572076, 3762672, 2728256, 1669120
Offset: 0

Author

Joseph Myers, Jul 21 2013

Keywords

Comments

The number of walks ending with x = -k is the same as the number ending with x = k.

Examples

			Initial rows (paths of length 0, 2, 4, ...):
{ 1 };
{ 4, 4 };
{ 28, 24, 16 };
{ 188, 188, 128, 64 }.
		

A227716 Triangle read by rows: Number of (2n+1)-step self-avoiding walks on diamond lattice ending at point with x = 2k+1.

Original entry on oeis.org

2, 10, 8, 74, 56, 32, 518, 464, 288, 128, 3934, 3520, 2656, 1408, 512, 29914, 27768, 21920, 14336, 6656, 2048, 232094, 217316, 181456, 128256, 74240, 30720, 8192, 1812890, 1719616, 1475172, 1118592, 716288, 372736, 139264, 32768, 14277886, 13633972, 11989800, 9480048
Offset: 0

Author

Joseph Myers, Jul 21 2013

Keywords

Comments

The number of walks ending with x = -k is the same as the number ending with x = k.

Examples

			Initial rows (paths of length 1, 3, 5, ...):
{ 2 };
{ 10, 8 };
{ 74, 56, 32 };
{ 518, 464, 288, 128 }.
		

A227511 Triangle read by rows: Number of n-step self-avoiding walks on f.c.c. lattice ending at point with x = k.

Original entry on oeis.org

1, 4, 4, 36, 32, 16, 308, 292, 192, 64, 2764, 2672, 2016, 1024, 256, 25404, 24780, 20160, 12480, 5120, 1024, 237164, 232512, 197940, 137472, 71680, 24576, 4096, 2237948, 2201948, 1930944, 1443616, 869376, 390144, 114688, 16384, 21286548, 20997008, 18805488, 14786176
Offset: 0

Author

Joseph Myers, Jul 14 2013

Keywords

Comments

The number of walks ending with x = -k is the same as the number ending with x = k.

Examples

			Initial rows (paths of length 0, 1, 2, ...):
{ 1 };
{ 4, 4 };
{ 36, 32, 16 };
{ 308, 292, 192, 64 }.
		

Crossrefs

A227338 Number of n-step self-avoiding walks on cubic lattice ending at point with x = k.

Original entry on oeis.org

1, 4, 1, 12, 8, 1, 44, 40, 12, 1, 172, 176, 84, 16, 1, 772, 748, 468, 144, 20, 1, 3308, 3248, 2332, 984, 220, 24, 1, 14924, 14280, 11068, 5756, 1788, 312, 28, 1, 64956, 63768, 51472, 30760, 12108, 2944, 420, 32, 1, 294252, 285296, 237832, 155912, 72948, 22732, 4516
Offset: 0

Author

Joseph Myers, Jul 07 2013

Keywords

Comments

The number of walks ending with x = -k is the same as the number ending with x = k.

Examples

			Initial rows (paths of length 0, 1, 2, ...):
1;
4, 1;
12, 8, 1;
44, 40, 12, 1;
...
		

Crossrefs

Formula

For n > 0, A001412(n) = T(n,0) + 2 * Sum_{k=1..n} T(n,k). - Bert Dobbelaere, Jan 06 2019

A220350 Number of ways of putting 2n^2 counters on distinct squares of a 2n x 2n board so that no row, column or main diagonal contains more than n counters.

Original entry on oeis.org

0, 33, 112160, 43346734009, 2441203940002594824
Offset: 1

Author

Joseph Myers, Dec 11 2012

Keywords

Examples

			Configurations for n=2 (4x4 board) (o = counter):
.
oo.. (2 orientations)
o.o.
.o.o
..oo
.
.o.o (2 orientations)
oo..
..oo
o.o.
.
oo.. (4 orientations)
o..o
..oo
.oo.
.
oo.. (4 orientations)
..oo
oo..
..oo
.
oo.. (4 orientations)
..oo
..oo
oo..
.
oo.. (8 orientations)
..oo
o..o
.oo.
.
o.o. (4 orientations)
.o.o
.o.o
o.o.
.
o.o. (4 orientations)
.o.o
o..o
.oo.
.
.oo. (1 orientation)
o..o
o..o
.oo.