A060477
Number of orbits of length n in map whose periodic points are A000051.
Original entry on oeis.org
3, 1, 2, 3, 6, 9, 18, 30, 56, 99, 186, 335, 630, 1161, 2182, 4080, 7710, 14532, 27594, 52377, 99858, 190557, 364722, 698870, 1342176, 2580795, 4971008, 9586395, 18512790, 35790267, 69273666, 134215680, 260300986, 505286415, 981706806, 1908866960, 3714566310
Offset: 1
a(3)=2 since the 3rd term of A000051 is 9 and the first term is 3.
-
a000051(n) = 2^n+1;
a(n) = (1/n)*sumdiv(n, d, moebius(d)*a000051(n/d)); \\ Michel Marcus, Sep 11 2017
-
from sympy import mobius, divisors
def A060477(n): return sum(mobius(n//d)*(2**d+1) for d in divisors(n,generator=True))//n # Chai Wah Wu, Feb 03 2022
A078830
Numbers having in binary representation exactly one binary substring representing a prime.
Original entry on oeis.org
2, 3, 4, 8, 9, 16, 32, 33, 64, 65, 128, 129, 256, 512, 513, 1024, 1025, 2048, 2049, 4096, 4097, 8192, 8193, 16384, 16385, 32768, 32769, 65536, 131072, 131073, 262144, 262145, 524288, 524289, 1048576, 1048577, 2097152, 2097153, 4194304, 4194305
Offset: 1
p=2 -> '10' is the only prime contained exactly once in 2^k, k>0.
A143096
a(n) = 2*a(n-1)-1, with a(1)=1, a(2)=4, a(3)=5.
Original entry on oeis.org
1, 4, 5, 9, 17, 33, 65, 129, 257, 513, 1025, 2049, 4097, 8193, 16385, 32769, 65537, 131073, 262145, 524289, 1048577, 2097153, 4194305, 8388609, 16777217, 33554433, 67108865, 134217729, 268435457, 536870913, 1073741825, 2147483649, 4294967297, 8589934593
Offset: 1
a(4) = 9 = 2*a(3) - 1 = 2*5 - 1.
a(4) = 9 = (1, 3, 3, 1) dot (1, 3, -2, 5) = (1 + 9 - 6 + 5).
-
Join[{1,4},NestList[2#-1&,5,40]] (* or *) Join[{1,4},LinearRecurrence[ {3,-2},{5,9},40]] (* Harvey P. Dale, Feb 18 2014 *)
A345254
Dispersion of A004754, a rectangular array T(n,k) read by downward antidiagonals.
Original entry on oeis.org
1, 2, 3, 4, 5, 6, 8, 9, 10, 7, 16, 17, 18, 11, 12, 32, 33, 34, 19, 20, 13, 64, 65, 66, 35, 36, 21, 14, 128, 129, 130, 67, 68, 37, 22, 15, 256, 257, 258, 131, 132, 69, 38, 23, 24, 512, 513, 514, 259, 260, 133, 70, 39, 40, 25, 1024, 1025, 1026, 515, 516, 261, 134
Offset: 1
Northwest corner of {T(n,k)}:
k=1 k=2 k=3 k=4 k=5 k=6
n=0: 1, 2, 4, 8, 16, 32, ...
n=1: 3, 5, 9, 17, 33, 65, ...
n=2: 6, 10, 18, 34, 66, 130, ...
n=3: 7, 11, 19, 35, 67, 131, ...
n=4: 12, 20, 36, 68, 132, 260, ...
...
Northwest corner of {T(n,k)} in base-2:
k=1 k=2 k=3 k=4 k=5 k=6
n=0: 1, 10, 100, 1000, 10000, 100000, ...
n=1: 11, 101, 1001, 10001, 100001, 1000001, ...
n=2: 110, 1010, 10010, 100010, 1000010, 10000010, ...
n=3: 111, 1011, 10011, 100010, 1000011, 10000011, ...
n=4: 1100,10100, 100100, 1000100, 10000100, 100000100, ...
...
Cf.
A000027,
A004754,
A053645,
A005408,
A005843,
A019586,
A054582,
A059893,
A065120,
A139706,
A139708,
A191448,
A345252,
A345253.
-
(*Simplified Formula*)
MatrixForm[Prepend[Table[n + 2^(Floor[Log[2, n]] + k), {n, 1, 4}, {k, 1, 6}], Table[2^(k - 1), {k, 1, 6}]]]
(*Branching Formula*)
MatrixForm[Prepend[Table[NestList[Function[# + 2^(Floor[Log[2, #]])], n + 2^(Floor[Log[2, n]] + 1), 5], {n, 1, 4}], NestList[Function[# + 2^(Floor[Log[2, #]])], 1, 5]]]
-
T(n, k) = if (n==0, 2^(k-1), n + 2^(log(n)\log(2) + k));
matrix(7, 7, n, k, n--; T(n, k)) \\ Michel Marcus, Jul 30 2021
A380728
For n a power of 2, a(n) = n. Otherwise a(n) is the smallest number not yet in the sequence which is coprime to n and has the same binary weight as n.
Original entry on oeis.org
1, 2, 5, 4, 3, 17, 11, 8, 10, 9, 7, 65, 14, 13, 23, 16, 6, 257, 21, 33, 19, 25, 15, 1025, 22, 35, 29, 37, 27, 43, 47, 32, 20, 129, 26, 4097, 28, 41, 46, 513, 38, 67, 30, 49, 53, 39, 31, 16385, 44, 69, 58, 73, 45, 71, 59, 81, 77, 51, 55, 83, 62, 61, 95, 64, 12
Offset: 1
a(1) = 1, the smallest novel number coprime to 1 and having same binary weight (1)
a(3) = 5, since weight(3) = weight(5) = 2 and gcd(2,5) = 1, and 5 is least such number.
a(5) = 3 (sequence is self inverse).
-
nn = 2^13; c[_] := False; u = 1;
f[x_] := f[x] = DigitCount[x, 2, 1];
Reap[Do[w = f[n];
Which[w == 1, k = n,
And[w == 2, EvenQ[n]],
k = 3; While[Or[c[k], ! CoprimeQ[k, n]], k = 2*(k - 1) + 1],
True, k = u; While[Or[c[k], ! CoprimeQ[k, n], w != f[k]], k++] ];
Sow[k]; c[k] = True;
If[k == u, While[c[u], u++]], {n, nn}] ][[-1, 1]] (* Michael De Vlieger, Feb 02 2025 *)
Showing 1-5 of 5 results.
Comments