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 33 results. Next

A249722 Numbers n such that there is a multiple of 4 on row n of Pascal's triangle with property that all multiples of 9 on the same row (if they exist) are larger than it.

Original entry on oeis.org

4, 6, 8, 12, 14, 16, 17, 20, 22, 24, 25, 26, 28, 30, 32, 33, 34, 35, 38, 40, 41, 42, 44, 48, 49, 50, 51, 52, 53, 56, 57, 58, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 74, 76, 77, 78, 80, 84, 86, 88, 89, 92, 94, 96, 97, 98, 100, 101, 102, 104, 105, 106, 107, 112, 113, 114, 115, 116, 120, 121, 122, 124, 125
Offset: 1

Views

Author

Antti Karttunen, Nov 04 2014

Keywords

Comments

All n such that on row n of A034931 (Pascal's triangle reduced modulo 4) there is at least one zero and the distance from the edge to the nearest zero is shorter than the distance from the edge to the nearest zero on row n of A095143 (Pascal's triangle reduced modulo 9), the latter distance taken to be infinite if there are no zeros on that row in the latter triangle.

Examples

			Row 4 of Pascal's triangle (A007318) is {1,4,6,4,1}. The least multiple of 4 occurs as C(4,1) = 4, and there are no multiples of 9 present, thus 4 is included among the terms.
Row 12 of Pascal's triangle is {1,12,66,220,495,792,924,792,495,220,66,12,1}. The least multiple of 4 occurs as C(12,1) = 12, which is less than the least multiple of 9 present at C(12,4) = 495 = 9*55, thus 12 is included among the terms.
		

Crossrefs

A subsequence of A249724.
Natural numbers (A000027) is a disjoint union of the sequences A048278, A249722, A249723 and A249726.

Programs

  • PARI
    A249722list(upto_n) = { my(i=0, n=0); while(i
    				

A249724 Numbers k such that on row k of Pascal's triangle there is no multiple of 9 which would be less than any (potential) multiple of 4 on the same row.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 17, 20, 22, 23, 24, 25, 26, 28, 30, 32, 33, 34, 35, 36, 38, 40, 41, 42, 44, 48, 49, 50, 51, 52, 53, 56, 57, 58, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 80, 84, 86, 88, 89, 92, 94, 96, 97, 98, 100, 101, 102, 104, 105, 106, 107, 108, 110, 112, 113, 114, 115, 116, 120, 121
Offset: 1

Views

Author

Antti Karttunen, Nov 04 2014

Keywords

Comments

Disjoint union of {0} and the following sequences: A048278 (gives 7 other cases where there are neither multiples of 4 nor 9 on row k), A249722 (rows where a multiple of 4 is found before a multiple of 9), A249726 (cases where the least term on row k which is a multiple of 4 is also a multiple of 9, and vice versa, i.e., such a term a multiple of 36).
If A249717(k) < 3 then k is included in this sequence. This is a sufficient but not necessary condition, e.g., A249717(25) = 5, but 25 is also included in this sequence.

Crossrefs

Programs

  • PARI
    A249724list(upto_n) = { my(i=0, n=0, dont_print=0); while(i
    				

A249726 Numbers n such that there is a multiple of 36 on row n of Pascal's triangle with property that it is also the least multiple of 4 and the least multiple of 9 on the same row.

Original entry on oeis.org

36, 72, 73, 108, 110, 144, 145, 147, 180, 216, 217, 218, 221, 252, 288, 289, 291, 295, 324, 326, 360, 361, 396, 432, 433, 434, 435, 437, 443, 468, 504, 505, 540, 542, 576, 577, 579, 583, 612, 648, 649, 650, 653, 684, 720, 721, 723, 756, 758, 792, 793, 828, 864, 865, 866, 867, 869, 871, 875, 887, 900, 936, 937, 972, 974, 1008, 1009, 1011, 1044, 1080
Offset: 1

Views

Author

Antti Karttunen, Nov 04 2014

Keywords

Comments

All n such that both on row n of A034931 (Pascal's triangle reduced modulo 4) and on row n of A095143 (Pascal's triangle reduced modulo 9) there is at least one zero and the distance from the edge to the nearest zero is same on both rows.

Crossrefs

Subsequence of A249724.
A044102 is a subsequence (after zero).
Natural numbers (A000027) is a disjoint union of the sequences A048278, A249722, A249723 and A249726.

Programs

  • PARI
    A249726list(upto_n) = { my(i=0, n=0); while(i
    				

A294994 Begin with 2; thereafter a(n) is the least prime not already in the sequence such that the Hamming distance between it and the preceding prime is at most 2.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 29, 17, 19, 23, 31, 47, 37, 41, 43, 59, 61, 53, 101, 71, 67, 73, 79, 103, 97, 107, 109, 127, 191, 151, 131, 137, 139, 163, 167, 173, 157, 149, 181, 179, 211, 83, 89, 113, 241, 193, 197, 199, 223, 239, 227, 229, 233, 251, 379, 283, 271, 263, 257, 269, 277, 281, 313, 307, 311, 293
Offset: 1

Views

Author

Robert G. Wilson v, Nov 12 2017

Keywords

Comments

The Hamming distance between two primes p and q is the Hamming distance between their binary expansions. - N. J. A. Sloane, May 27 2018
Conjecture: this sequence is a permutation of the primes.
By definition, the absolute difference of a(n) and a(n + 1) is in A048645. - David A. Corneth, Jan 12 2018

Crossrefs

See also A303593, A303594, A303595 (when n-th prime appears).

Programs

  • Mathematica
    f[s_List] := Block[{p = s[[-1]], q = 3}, While[MemberQ[s, q] || Plus @@ IntegerDigits [BitXor[p, q], 2] > 2, q = NextPrime@q]; Append[s, q]]; s = {2}; Nest[f, s, 65]
  • PARI
    s = 0; v = 2; for (n=1, 66, print1 (v ", "); s += 2^v; forprime (p=2, oo, if (!bittest(s, p) && hammingweight(bitxor(p, v))<=2, v = p; break))) \\ Rémy Sigrist, Jan 08 2018

A255263 Differences between the total number of ON cells at stage n of two-dimensional cellular automaton defined by "Rule 750" using the von Neumann neighborhood and the total number of toothpicks in the toothpick structure A139250 that are parallel to the initial toothpick, after n odd rounds.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 4, 12, 20, 0, 0, 0, 4, 0, 4, 12, 20, 0, 4, 12, 20, 12, 36, 80, 68, 0, 0, 0, 4, 0, 4, 12, 20, 0, 4, 12, 20, 12, 36, 80, 68, 0, 4, 12, 20, 12, 36, 80, 68, 12, 36, 80, 84, 96, 208, 352, 196, 0, 0, 0, 4, 0, 4, 12, 20, 0, 4, 12, 20, 12, 36, 80, 68, 0, 4, 12, 20, 12, 36, 80, 68, 12, 36, 80
Offset: 1

Views

Author

Omar E. Pol, Feb 19 2015

Keywords

Comments

It appears that the graph of A162795 lies between the graphs of A147562 and A169707.
It appears that a(n) = 0 if and only if n is a member of A048645.

Examples

			Written as an irregular triangle T(j,k), k>=1, in which the row lengths are the terms of A011782:
0;
0;
0,0;
0,0,4,0;
0,0,4,0,4,12,20,0;
0,0,4,0,4,12,20,0,4,12,20,12,36,80,68,0;
0,0,4,0,4,12,20,0,4,12,20,12,36,80,68,0,4,12,20,12,36,80,68,12,36,80,84,96,208,352,196,0;
...
It appears that if k is a power of 2 then T(j,k) = 0.
		

Crossrefs

Formula

a(n) = A169707(n) - A162795(n).

A356880 Squares that can be expressed as the sum of two powers of two (2^x + 2^y).

Original entry on oeis.org

4, 9, 16, 36, 64, 144, 256, 576, 1024, 2304, 4096, 9216, 16384, 36864, 65536, 147456, 262144, 589824, 1048576, 2359296, 4194304, 9437184, 16777216, 37748736, 67108864, 150994944, 268435456, 603979776, 1073741824, 2415919104, 4294967296, 9663676416, 17179869184
Offset: 1

Views

Author

Karl-Heinz Hofmann, Sep 02 2022

Keywords

Comments

If x is even, y = x + 3; if x is odd, y = x.
Proof for odd x: (2^odd + 2^odd) = 2^(odd + 1) = 2^even --> must be a square.
Proof for even x: 2^even + 2^(even + 3) = 1*(2^even) + (2^even * 2^3) = 1*(2^even) + (2^even * 8) = 1*(2^even) + 8*(2^even) = 9*(2^even); since 9 is a square and 2^even is a square, the multiplication result must be a square too.
And 9 is the only square that can be written as 1 + a power of 2.
Note that a(n) = A272711(n+1) for n=1..23, but beyond it differs more and more.

Examples

			2^4 + 2^7 = 144, a square, thus 144 is a term.
		

Crossrefs

Intersection of A000290 and A048645\{1}.
Cf. A272711, A270473 (squares that can be expressed as 3^x + 3^y).
Cf. A220221.

Programs

  • Maple
    seq(`if`(n::even, 9*2^(n-2), 2^(n+1)),n=1..50); # Robert Israel, Sep 15 2022
  • Mathematica
    Select[Range[2, 2^17]^2, DigitCount[#, 2, 1] <= 2 &] (* Amiram Eldar, Sep 03 2022 *)
  • PARI
    a(n) = if (n%2, 2^(n+1), 9*2^(n-2)); \\ Michel Marcus, Sep 15 2022
  • Python
    def A356880(n):
        if n % 2 == 0: return 9*2**(n-2)
        else: return 2**(n+1)
    

Formula

a(n) = A029744(n+1)^2.
a(n) = 9 * 2^(n-2) if n is even (see A002063).
a(n) = 2^(n+1) if n is odd (see A000302).
From Stefano Spezia, Sep 09 2022: (Start)
G.f.: x*(4 + 9*x)/(1 - 4*x^2).
E.g.f.: (9*(cosh(2*x) - 1) + 8*sinh(2*x))/4. (End)

A095736 Numbers with binary weight (A000120) <= 3.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 44, 48, 49, 50, 52, 56, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 76, 80, 81, 82, 84, 88, 96, 97, 98, 100, 104, 112, 128, 129, 130, 131, 132, 133, 134, 136
Offset: 1

Views

Author

N. J. A. Sloane, Jun 23 2009

Keywords

Comments

There are O(log^4 x) members of this sequence up to x. - Charles R Greathouse IV, Mar 29 2013

Crossrefs

Programs

Formula

Sum_{n>=2} 1/a(n) = 4.957591106549526542379494338911534917897082748621184321529665450307117309571... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022

A355809 a(n) is the number at the apex of a triangle whose base contains the distinct powers of 2 summing to n (in ascending order), and each number in a higher row is the sum of the two numbers directly below it; a(0) = 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 8, 9, 10, 13, 12, 17, 18, 27, 16, 17, 18, 21, 20, 25, 26, 35, 24, 33, 34, 47, 36, 53, 54, 81, 32, 33, 34, 37, 36, 41, 42, 51, 40, 49, 50, 63, 52, 69, 70, 97, 48, 65, 66, 87, 68, 93, 94, 129, 72, 105, 106, 153, 108, 161, 162, 243, 64, 65
Offset: 0

Views

Author

Rémy Sigrist, Jul 18 2022

Keywords

Examples

			For n = 27:
- we have the following triangle:
          47
        13  34
       3  10  24
     1   2   8  16
- so a(27) = 47.
		

Crossrefs

See A355807 for similar sequences.

Programs

  • PARI
    a(n) = { my (b=vector(hammingweight(n))); for (k=1, #b, n-=b[k]=2^valuation(n, 2)); while (#b>1, b=vector(#b-1, k, b[k+1]+b[k])); if (#b, b[1], 0) }

Formula

a(n) >= n with equality iff n = 0 or n belongs to A048645.
a(2*n) = 2*a(n).

A151757 Positive integers n, excluding 1 and 2^i+1 for all i, having wt <= 3.

Original entry on oeis.org

4, 6, 7, 8, 10, 11, 12, 13, 14, 16, 18, 19, 20, 21, 22, 24, 25, 26, 28, 32, 34, 35, 36, 37, 38, 40, 41, 42, 44, 48, 49, 50, 52, 56, 64, 66, 67, 68, 69, 70, 72, 73, 74, 76, 80, 81, 82, 84, 88, 96, 97, 98, 100, 104, 112, 128, 130, 131, 132, 133, 134, 136, 137, 138, 140, 144, 145, 146
Offset: 1

Views

Author

N. J. A. Sloane, Jun 21 2009

Keywords

Comments

Arises in analyzing A151755.

Crossrefs

Programs

  • Maple
    N:= 8: # for terms <= 2^(N+1)
    Res1:= {seq(2^i,i=2..N)}:
    Res2:= {seq(seq(2^i+2^j,i=1..j-1),j=2..N)}:
    Res3:= {seq(seq(seq(2^i+2^j+2^k, i=0..j-1),j=1..k-1),k=2..N)}:
    sort(convert(Res1 union Res2 union Res3,list)); # Robert Israel, Mar 27 2020

A285438 Perfect powers that are also the sum of two powers of a prime p.

Original entry on oeis.org

4, 8, 9, 16, 32, 36, 64, 128, 144, 256, 324, 512, 576, 1024, 2048, 2304, 2744, 2916, 4096, 8192, 9216, 16384, 26244, 32768, 36864, 65536, 131072, 147456, 236196, 262144, 524288, 589824, 941192, 1048576, 2097152, 2125764, 2359296, 4194304, 8388608, 9437184
Offset: 1

Views

Author

Michael Josephy, Apr 18 2017

Keywords

Comments

Integers n such that there exist integers i, j, k, m, p with i, j >= 0, m, k >= 2 and p prime, such that n = m^k = p^i + p^j.
These are numbers of the form 2^r = 2^(r-1) + 2^(r-1) when r >= 2, numbers of the form (3*2^r)^2 = 2^(2*r) + 2^(2*r+3) and numbers of the form (2*p^r)^k = p^(r*k) + p^(r*k+1) when p = 2^k - 1 is a Mersenne prime. [Edited by Jinyuan Wang, Nov 30 2019]
If n = p^i + p^j is a term with exactly two sets of integer solutions (p, i, j), where i <= j, then n must be 36 = 6^2 = 2^2 + 2^5 = 3^2 + 3^3 or of the form 2^k = 2^(k-1) + 2^(k-1) = p^0 + p^1 where p = 2^k - 1 is a Mersenne prime. There is no n = p^i + p^j in this sequence with at least three sets of integer solutions (p, i, j), where i <= j. - Jinyuan Wang, Nov 30 2019

Examples

			324 = 18^2 = 3^4 + 3^5.
		

Crossrefs

Programs

  • Maple
    N:= 10^9: # to get all terms <= N
    R1:= {seq(2^i,i=2..ilog2(N))}:
    R2:= {seq(9*2^(2*r), r=0..ilog2(floor(N/9))/2)}:
    R3:= {seq(seq(2^k*(2^k-1)^(r*k),r=1..floor(log[2^k-1](N/2^k)/k)),k=select(t -> isprime(2^t-1),[$2..ilog2(N)]))}:
    sort(convert(R1 union R2 union R3, list)); # Robert Israel, Apr 25 2017
  • PARI
    upto(nn) = {my(v=List([]), k=1); for(r=2, logint(nn, 2), listput(v, 2^r)); for(r=0, logint(nn\9, 4), listput(v, 9*4^r)); while((2*2^k-2)^kJinyuan Wang, Nov 30 2019

Extensions

a(19)-a(40) from Robert Israel, Apr 25 2017
Previous Showing 21-30 of 33 results. Next