1, 4, 5, 6, 9, 12, 15, 16, 17, 20, 21, 22, 25, 26, 27, 30, 33, 36, 37, 38, 41, 44, 47, 48, 49, 52, 55, 58, 59, 60, 63, 64, 65, 68, 69, 70, 73, 76, 79, 80, 81, 84, 85, 86, 89, 90, 91, 94, 97, 100, 101, 102, 105, 106, 107, 110, 111, 112, 115, 118, 121, 122, 123, 126, 129, 132
Offset: 1
A003157
A self-generating sequence (see Comments in A003156 for the definition).
Original entry on oeis.org
3, 8, 11, 14, 19, 24, 29, 32, 35, 40, 43, 46, 51, 54, 57, 62, 67, 72, 75, 78, 83, 88, 93, 96, 99, 104, 109, 114, 117, 120, 125, 128, 131, 136, 139, 142, 147, 152, 157, 160
Offset: 1
As a word, A286044 = 001000010010010000100..., in which 1 is in positions a(n) for n>=1. - _Clark Kimberling_, May 07 2017
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {1, 0}}] &, {0}, 9] (* Thue-Morse, A010060 *)
w = StringJoin[Map[ToString, s]]
w1 = StringReplace[w, {"011" -> "0"}]
st = ToCharacterCode[w1] - 48 (* A286044 *)
Flatten[Position[st, 0]] (* A286045 *)
Flatten[Position[st, 1]] (* A003157 *)
(* Clark Kimberling, May 07 2017 *)
-
def A003157(n):
def bisection(f,kmin=0,kmax=1):
while f(kmax) > kmax: kmax <<= 1
kmin = kmax >> 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x):
c, s = n+x, bin(x)[2:]
l = len(s)
for i in range(l&1,l,2):
c -= int(s[i])+int('0'+s[:i],2)
return c
return bisection(f,n,n)+n # Chai Wah Wu, Jan 29 2025
A102839
a(0) = 0, a(1) = 1, and a(n) = ((2*n - 1)*a(n-1) + 3*n*a(n-2))/(n - 1) for n >= 2.
Original entry on oeis.org
0, 1, 3, 12, 40, 135, 441, 1428, 4572, 14535, 45925, 144408, 452244, 1411501, 4392675, 13636080, 42237792, 130580451, 403009209, 1241912580, 3821849640, 11746816389, 36064532427, 110610649548, 338928124500, 1037636534025
Offset: 0
From _Petros Hadjicostas_, Jun 03 2020: (Start)
With n = 3 edges, we list below the a(3-1) = 3 two-sets of leaves among all A001006(3) = 4 Motzkin trees:
A A
| |
| |
B B
| / \
| / \
C C D
| {C, D}
|
D
No 2-sets of leaves
A A
/ \ / \
/ \ / \
B C B C
| |
| |
D D
{C, D} {B, D}
With n = 3 edges, there is only A005043(3) = 1 non-redundant tree and a(3-1) = 3 two-sets of leaves:
A
/|\
/ | \
B C D
{B, C}, {B, D}, {C, D}
With n = 4 edges there are A005043(4) = 3 non-redundant trees and a(4-1) = 12 two-sets of leaves:
A A A
/ / \ \ / \ / \
/ / \ \ / \ / \
B C D E B C B C
{B, C}, {B, D}, {B, E}, / \ / \
{C, D}, {C, E}, {D, E} / \ / \
D E D E
{D, E}, {D, C}, {E, C} {B, D}, {B, E}, {D, E}
(End)
-
seq(add(k*binomial(n, k)*binomial(n-k, k)/2, k=0..n), n=1..26); # Zerinvary Lajos, Oct 23 2007
-
Table[4^(n-1)*JacobiP[n-1,-n-1/2,-n-1/2,-1/2], {n,0,25}] (* Peter Luschny, May 13 2016 *)
nxt[{n_,a_,b_}]:={n+1,b,(b(2n+1)+3a(n+1))/n}; NestList[nxt,{1,0,1},30][[;;,2]] (* Harvey P. Dale, Mar 31 2024 *)
-
a(n) = if(n<2,if(n,1,0),1/(n-1)*((2*n-1)*a(n-1)+3*n*a(n-2)))
A232744
Numbers k for which the largest m such that m! divides k is odd.
Original entry on oeis.org
1, 3, 5, 6, 7, 9, 11, 12, 13, 15, 17, 18, 19, 21, 23, 25, 27, 29, 30, 31, 33, 35, 36, 37, 39, 41, 42, 43, 45, 47, 49, 51, 53, 54, 55, 57, 59, 60, 61, 63, 65, 66, 67, 69, 71, 73, 75, 77, 78, 79, 81, 83, 84, 85, 87, 89, 90, 91, 93, 95, 97, 99, 101, 102, 103, 105
Offset: 1
-
seq[max_] := Select[Range[max!], EvenQ @ LengthWhile[Reverse @ IntegerDigits[#, MixedRadix[Range[max, 2, -1]]], #1 == 0 &] &]; seq[5] (* Amiram Eldar, Feb 26 2021 *)
A334747
Let p be the smallest prime not dividing the squarefree part of n. Multiply n by p and divide by the product of all smaller primes.
Original entry on oeis.org
2, 3, 6, 8, 10, 5, 14, 12, 18, 15, 22, 24, 26, 21, 30, 32, 34, 27, 38, 40, 42, 33, 46, 20, 50, 39, 54, 56, 58, 7, 62, 48, 66, 51, 70, 72, 74, 57, 78, 60, 82, 35, 86, 88, 90, 69, 94, 96, 98, 75, 102, 104, 106, 45, 110, 84, 114, 87, 118, 120, 122, 93, 126, 128, 130, 55
Offset: 1
168 = 42*4 has squarefree part 42 (and square part 4). The smallest prime absent from 42 = 2*3*7 is 5 and the product of all smaller primes is 2*3 = 6. So a(168) = 168*5/6 = 140.
-
a(n) = {my(c=core(n), m=n); forprime(p=2, , if(c % p, m*=p; break, m/=p)); m;} \\ Michel Marcus, May 22 2020
A372591
Numbers whose binary weight (A000120) plus bigomega (A001222) is even.
Original entry on oeis.org
2, 6, 7, 8, 9, 10, 11, 13, 15, 19, 24, 28, 31, 32, 33, 34, 36, 37, 39, 40, 41, 42, 44, 46, 47, 50, 51, 52, 54, 57, 58, 59, 60, 61, 65, 67, 70, 73, 76, 77, 79, 85, 86, 90, 95, 96, 97, 98, 103, 106, 107, 109, 110, 111, 112, 117, 119, 123, 124, 126, 127, 128, 129
Offset: 1
The terms (center), their binary indices (left), and their weakly decreasing prime indices (right) begin:
{2} 2 (1)
{2,3} 6 (2,1)
{1,2,3} 7 (4)
{4} 8 (1,1,1)
{1,4} 9 (2,2)
{2,4} 10 (3,1)
{1,2,4} 11 (5)
{1,3,4} 13 (6)
{1,2,3,4} 15 (3,2)
{1,2,5} 19 (8)
{4,5} 24 (2,1,1,1)
{3,4,5} 28 (4,1,1)
{1,2,3,4,5} 31 (11)
{6} 32 (1,1,1,1,1)
{1,6} 33 (5,2)
{2,6} 34 (7,1)
{3,6} 36 (2,2,1,1)
{1,3,6} 37 (12)
{1,2,3,6} 39 (6,2)
{4,6} 40 (3,1,1,1)
{1,4,6} 41 (13)
{2,4,6} 42 (4,2,1)
For just binary indices:
For just prime indices:
A070939 gives length of binary expansion.
Comments