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

A281257 Primes in A067894: primes in the partial sums of the binary representations of the first m natural numbers, reading these representations in decimal.

Original entry on oeis.org

11, 223, 2556997, 3333331, 14559007, 47836783, 56672227, 65555671, 181114559, 411488881, 583227779, 1399999987, 5723503439, 10047846871, 11361255547, 13787777879, 18474111311, 19905449987, 20235780199, 21226777753, 22557892319, 71445725647, 83447001413, 103459003423
Offset: 1

Views

Author

K. D. Bajpai, Jan 18 2017

Keywords

Comments

Intersection of A000040 and A067894.

Examples

			0 + 1 + 10 = 11 (prime), so 11 is in the sequence.
0 + 1 + 10 + 11 + 100 + 101 = 223 (prime), so 223 is in the sequence.
		

Crossrefs

Programs

  • Maple
    select(isprime, ListTools:-PartialSums(map(convert,[$1..1000],binary))); # Robert Israel, Jan 18 2017
  • Mathematica
    Select[Accumulate[Table[FromDigits[IntegerDigits[n, 2]], {n, 0, 1000}]], PrimeQ]
  • PARI
    F(k,{b=10})=sum(i=1,k,subst(Pol(binary(i),y),y,b));
    test(k,{b=10})={my(z=F(k,b));return(isprime(z)*z)};
    Values(n,{b=10})={my(L=List(),j,t);while(#LR. J. Cano, Jan 19 2017

A067895 Write 2^n, 2^n+1, 2^n+2, ..., 2^(n+1)-1 in binary and add as if they were decimal numbers.

Original entry on oeis.org

1, 21, 422, 8444, 168888, 3377776, 67555552, 1351111104, 27022222208, 540444444416, 10808888888832, 216177777777664, 4323555555555328, 86471111111110656, 1729422222222221312, 34588444444444442624, 691768888888888885248, 13835377777777777770496, 276707555555555555540992
Offset: 0

Views

Author

N. J. A. Sloane, May 15 2003

Keywords

Examples

			2^2 to 2^3-1 = 4 through 7 = 100, 101, 110 and 111 in binary and when summed = 422.
		

Crossrefs

Cf. A067894.

Programs

  • Mathematica
    Table[Total[FromDigits[IntegerDigits[#,2]]&/@(Range[2^n,2^(n+1)-1])],{n,0,20}] (* Harvey P. Dale, May 20 2012 *)
  • PARI
    a(n)=if(n<0,0,2^(n-1)*(19*10^n-1)/9)

Formula

G.f.: (1 - x)/(1 - 22x + 40*x^2).
a(n) = 2^(n-1)*(19*10^n - 1)/9.
a(n) = 22*a(n-1) - 40*a(n-2).
E.g.f.: exp(2*x)*(19*exp(18*x) - 1)/18. - Stefano Spezia, Apr 03 2023

A121718 Write 0, 1, ..., n in base 3 and add as if they were decimal numbers.

Original entry on oeis.org

0, 1, 3, 13, 24, 36, 56, 77, 99, 199, 300, 402, 512, 623, 735, 855, 976, 1098, 1298, 1499, 1701, 1911, 2122, 2334, 2554, 2775, 2997, 3997, 4998, 6000, 7010, 8021, 9033, 10053, 11074, 12096, 13196, 14297, 15399, 16509, 17620, 18732, 19852, 20973, 22095
Offset: 0

Views

Author

Jonathan Vos Post, Sep 08 2006

Keywords

Comments

This is to A007089 as A067894 is to A007088.

Examples

			a(5) = 36 = 0 + 1 + 2 + 10 + 11 + 12.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Apply[Plus, Table[ FromDigits[ IntegerDigits[i, 3]], {i, 0, n}]]; Table[ f@n, {n, 0, 45}] (* Robert G. Wilson v Sep 10 2006 *)

A121807 Partial sums of A004676.

Original entry on oeis.org

10, 21, 122, 233, 1244, 2345, 12346, 22357, 32468, 43569, 54680, 154781, 255782, 356793, 457904, 568005, 679016, 790117, 1790128, 2790239, 3791240, 4792351, 5802362, 6813363, 7913364, 9013465, 10113576, 11214587, 12315688, 13425689
Offset: 1

Views

Author

Jonathan Vos Post, Sep 09 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[FromDigits@IntegerDigits[#,2]&/@Prime@Range@30] (* Giorgos Kalogeropoulos, Sep 13 2021 *)
  • PARI
    a(n) = sum(k=1, n, fromdigits(binary(prime(k)), 10)); \\ Michel Marcus, Sep 13 2021

A122613 Integers 1 through n written in primorial base, summed as if decimal.

Original entry on oeis.org

1, 11, 22, 42, 163, 264, 374, 485, 605, 726, 926, 1127, 1337, 1548, 1768, 1989, 2289, 2590, 2900, 3211, 3531, 3852, 4252, 4653, 5063, 5474, 5894, 6315, 7315, 8316, 9326, 10337, 11357, 12378, 13478, 14579, 15689, 16800, 17920, 19041, 20241, 21442
Offset: 1

Views

Author

Jonathan Vos Post, Sep 20 2006

Keywords

Comments

cf. A049345 n written in primorial base [Places reading from right have values (1, 2, 6, 30, 210, ...) = primorials]. Primes in this sequence are a(2) = 11, a(6) = 163, a(33) = 10337.

Examples

			a(1) = A049345(1) = 1.
a(2) = A049345(1) + A049345(2) = 1 + 10 = 11.
a(3) = A049345(1) + A049345(2) + A049345(3) = 1 + 10 + 11 = 22.
a(4) = 1 + 10 + 11 + 20 = 42.
a(5) = 1 + 10 + 11 + 20 + 21 = 63.
a(6) = 1 + 10 + 11 + 20 + 21 + 100 = 163.
a(33) = 1 + 10 + 11 + 20 + 21 + 100 + 101 + 110 + 111 + 120 + 121 + 200 + 201 + 210 + 211 + 220 + 221 + 300 + 301 + 310 + 311 + 320 + 321 + 400 + 401 + 410 + 411 + 420 + 421 + 1000 + 1001 + 1010 + 1011 = 10337.
		

Crossrefs

A360372 Numbers k >= 1 such that k divides Sum_{i=1..k} A007088(i).

Original entry on oeis.org

1, 11, 21, 23, 37, 461, 94101, 14958901, 16364133, 134375017, 192594821, 416095237, 4074380993, 82482257999
Offset: 1

Views

Author

Ctibor O. Zizka, Feb 04 2023

Keywords

Comments

The arithmetic mean of the first k binary numbers, taken as decimal numbers, is an integer.

Examples

			k = 11: (1 + 10 + 11 + 100 + 101 + 110 + 111 + 1000 + 1001 + 1010 + 1011) / 11 = 406, thus 11 is a term.
		

Crossrefs

Programs

  • Mathematica
    s = 0; seq = {}; Do[s += FromDigits[IntegerDigits[k, 2]]; If[Divisible[s, k], AppendTo[seq, k]], {k, 1, 1000}]; seq (* Amiram Eldar, Feb 04 2023 *)

Extensions

a(7)-a(13) from Amiram Eldar, Feb 04 2023
a(14) from Bert Dobbelaere, Feb 14 2023
Showing 1-6 of 6 results.