Displaying 1-10 of 18 results found.
Dirichlet convolution of A000027 (the identity function) with A349134 (Dirichlet inverse of Kimberling's paraphrases).
+20
7
1, 1, 1, 2, 2, 1, 3, 4, 2, 2, 5, 2, 6, 3, 0, 8, 8, 2, 9, 4, 0, 5, 11, 4, 6, 6, 4, 6, 14, 0, 15, 16, 0, 8, 0, 4, 18, 9, 0, 8, 20, 0, 21, 10, -2, 11, 23, 8, 12, 6, 0, 12, 26, 4, 0, 12, 0, 14, 29, 0, 30, 15, -3, 32, 0, 0, 33, 16, 0, 0, 35, 8, 36, 18, -4, 18, 0, 0, 39, 16, 8, 20, 41, 0, 0, 21, 0, 20, 44, -2, 0, 22, 0, 23
MATHEMATICA
k[n_] := (n / 2^IntegerExponent[n, 2] + 1)/2; kinv[1] = 1; kinv[n_] := kinv[n] = -DivisorSum[n, kinv[#] * k[n/#] &, # < n &]; a[n_] := DivisorSum[n, # * kinv[n/#] &]; Array[a, 100] (* Amiram Eldar, Nov 18 2021 *)
PROG
(PARI)
up_to = 16384;
DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(d<n, v[n/d]*u[d], 0)))); (u) }; \\ Compute the Dirichlet inverse of the sequence given in input vector v.
A003602(n) = (1+(n>>valuation(n, 2)))/2;
v349134 = DirInverseCorrect(vector(up_to, n, A003602(n)));
A003602(n) = (1+(n>>valuation(n, 2)))/2;
Dirichlet convolution of A001511 (the 2-adic valuation of 2n) with A349134 (the Dirichlet inverse of Kimberling's paraphrases).
+20
5
1, 1, -1, 1, -2, -1, -3, 1, -2, -2, -5, -1, -6, -3, 0, 1, -8, -2, -9, -2, 0, -5, -11, -1, -6, -6, -4, -3, -14, 0, -15, 1, 0, -8, 0, -2, -18, -9, 0, -2, -20, 0, -21, -5, 2, -11, -23, -1, -12, -6, 0, -6, -26, -4, 0, -3, 0, -14, -29, 0, -30, -15, 3, 1, 0, 0, -33, -8, 0, 0, -35, -2, -36, -18, 4, -9, 0, 0, -39, -2, -8
MATHEMATICA
k[n_] := (n / 2^IntegerExponent[n, 2] + 1)/2; kinv[1] = 1; kinv[n_] := kinv[n] = -DivisorSum[n, kinv[#]*k[n/#] &, # < n &]; a[n_] := DivisorSum[n, IntegerExponent[2*#, 2]*kinv[n/#] &]; Array[a, 100] (* Amiram Eldar, Nov 19 2021 *)
PROG
(PARI)
A003602(n) = (1+(n>>valuation(n, 2)))/2;
memoA349134 = Map();
A349134(n) = if(1==n, 1, my(v); if(mapisdefined(memoA349134, n, &v), v, v = -sumdiv(n, d, if(d<n, A003602(n/d)* A349134(d), 0)); mapput(memoA349134, n, v); (v)));
Dirichlet convolution of A000265 (odd part of n) with A349134 (Dirichlet inverse of Kimberling's paraphrases).
+20
4
1, 0, 1, 0, 2, 0, 3, 0, 2, 0, 5, 0, 6, 0, 0, 0, 8, 0, 9, 0, 0, 0, 11, 0, 6, 0, 4, 0, 14, 0, 15, 0, 0, 0, 0, 0, 18, 0, 0, 0, 20, 0, 21, 0, -2, 0, 23, 0, 12, 0, 0, 0, 26, 0, 0, 0, 0, 0, 29, 0, 30, 0, -3, 0, 0, 0, 33, 0, 0, 0, 35, 0, 36, 0, -4, 0, 0, 0, 39, 0, 8, 0, 41, 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 48, 0
FORMULA
If p is an odd prime, a(p) = (p-1)/2.
If n is even, a(n) = 0. (End)
MATHEMATICA
k[n_] := (n / 2^IntegerExponent[n, 2] + 1)/2; kinv[1] = 1; kinv[n_] := kinv[n] = -DivisorSum[n, kinv[#]*k[n/#] &, # < n &]; a[n_] := DivisorSum[n, # / 2^IntegerExponent[#, 2] * kinv[n/#] &]; Array[a, 100] (* Amiram Eldar, Nov 19 2021 *)
PROG
(PARI)
A000265(n) = (n >> valuation(n, 2));
A003602(n) = (1+(n>>valuation(n, 2)))/2;
memoA349134 = Map();
A349134(n) = if(1==n, 1, my(v); if(mapisdefined(memoA349134, n, &v), v, v = -sumdiv(n, d, if(d<n, A003602(n/d)* A349134(d), 0)); mapput(memoA349134, n, v); (v)));
Dirichlet convolution of A003415 (arithmetic derivative of n) with A349134 (Dirichlet inverse of Kimberling's paraphrases).
+20
3
0, 1, 1, 3, 1, 2, 1, 8, 4, 3, 1, 5, 1, 4, 3, 20, 1, 6, 1, 8, 4, 6, 1, 12, 7, 7, 14, 11, 1, 3, 1, 48, 6, 9, 5, 14, 1, 10, 7, 20, 1, 4, 1, 17, 8, 12, 1, 28, 10, 13, 9, 20, 1, 18, 7, 28, 10, 15, 1, 6, 1, 16, 11, 112, 8, 6, 1, 26, 12, 5, 1, 32, 1, 19, 11, 29, 8, 7, 1, 48, 46, 21, 1, 8, 10, 22, 15, 44, 1, 6, 9, 35, 16
PROG
(PARI)
A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
A003602(n) = (1+(n>>valuation(n, 2)))/2;
memoA349134 = Map();
A349134(n) = if(1==n, 1, my(v); if(mapisdefined(memoA349134, n, &v), v, v = -sumdiv(n, d, if(d<n, A003602(n/d)* A349134(d), 0)); mapput(memoA349134, n, v); (v)));
Dirichlet convolution of A126760 with A349134 (the Dirichlet inverse of Kimberling's paraphrases).
+20
3
1, 0, -1, 0, -1, 0, -1, 0, -2, 0, -2, 0, -2, 0, -1, 0, -3, 0, -3, 0, -2, 0, -4, 0, -1, 0, -4, 0, -5, 0, -5, 0, -3, 0, 1, 0, -6, 0, -4, 0, -7, 0, -7, 0, 0, 0, -8, 0, -4, 0, -5, 0, -9, 0, 3, 0, -6, 0, -10, 0, -10, 0, -1, 0, 2, 0, -11, 0, -7, 0, -12, 0, -12, 0, -3, 0, 1, 0, -13, 0, -8, 0, -14, 0, 4, 0, -9, 0, -15, 0, 0, 0
COMMENTS
Taking the Dirichlet convolution between this sequence and A349371 gives A349393, and similarly for many other such analogous pairs.
PROG
(PARI)
A003602(n) = (1+(n>>valuation(n, 2)))/2;
A126760(n) = {n&&n\=3^valuation(n, 3)<<valuation(n, 2); n%3+n\6*2}; \\ From A126760
memoA349134 = Map();
A349134(n) = if(1==n, 1, my(v); if(mapisdefined(memoA349134, n, &v), v, v = -sumdiv(n, d, if(d<n, A003602(n/d)* A349134(d), 0)); mapput(memoA349134, n, v); (v)));
Lexicographically earliest infinite sequence such that a(i) = a(j) => A349134(i) = A349134(j) for all i, j >= 1, where A349134 is Dirichlet inverse of Kimberling's paraphrases.
+20
1
1, 2, 3, 4, 5, 6, 7, 4, 2, 8, 9, 4, 10, 11, 11, 4, 12, 1, 13, 4, 14, 15, 16, 4, 7, 17, 3, 4, 18, 7, 19, 4, 17, 20, 15, 4, 21, 22, 23, 4, 24, 25, 26, 4, 8, 27, 28, 4, 12, 11, 22, 4, 29, 6, 23, 4, 30, 31, 32, 4, 33, 34, 11, 4, 20, 10, 35, 4, 36, 9, 37, 4, 38, 39, 23, 4, 20, 40, 41, 4, 7, 42, 43, 4, 30, 44, 34, 4, 45, 5, 22
PROG
(PARI)
up_to = 65537;
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };
DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1])*sumdiv(n, d, if(d<n, v[n/d]*u[d], 0))); (u) }; \\ Compute the Dirichlet inverse of the sequence given in input vector v
A003602(n) = (1+(n>>valuation(n, 2)))/2;
v366382 = rgs_transform(DirInverseCorrect(vector(up_to, n, A003602(n))));
Kimberling's paraphrases: if n = (2k-1)*2^m then a(n) = k.
(Formerly M0145)
+10
149
1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 8, 1, 9, 5, 10, 3, 11, 6, 12, 2, 13, 7, 14, 4, 15, 8, 16, 1, 17, 9, 18, 5, 19, 10, 20, 3, 21, 11, 22, 6, 23, 12, 24, 2, 25, 13, 26, 7, 27, 14, 28, 4, 29, 15, 30, 8, 31, 16, 32, 1, 33, 17, 34, 9, 35, 18, 36, 5, 37, 19, 38, 10, 39, 20, 40, 3, 41, 21, 42
COMMENTS
Fractal sequence obtained from powers of 2.
Sequence is T^(oo)(1) where T is acting on a word w = w(1)w(2)..w(m) as follows: T(w) = "1"w(1)"2"w(2)"3"(...)"m"w(m)"m+1". For instance T(ab) = 1a2b3. Thus T(1) = 112, T(T(1)) = 1121324, T(T(T(1))) = 112132415362748. - Benoit Cloitre, Mar 02 2009
Note that iterating the post-numbering operator U(w) = w(1) 1 w(2) 2 w(3) 3... produces the same limit sequence except with an additional "1" prepended, i.e., 1,1,1,2,1,3,2,4,... - Glen Whitney, Aug 30 2023
In the binary expansion of n, first swallow all zeros from the right, then add 1, and swallow the now-appearing 0 bit as well. - Ralf Stephan, Aug 22 2013
Although A264646 and this sequence initially agree in their digit-streams, they differ after 48 digits. - N. J. A. Sloane, Nov 20 2015
"[This is a] fractal because we get the same sequence after we delete from it the first appearance of all positive integers" - see Cobeli and Zaharescu link. - Robert G. Wilson v, Jun 03 2018
The sequence is the list of positive integers interleaved with the sequence itself. Provided the offset is suitable (which is the case here) a term of such a self-interleaved sequence is determined by the odd part of its index. Putting some of the formulas given here into words, a(n) is the position of the odd part of n in the list of odd numbers.
Applying the interleaving transform again, we get A110963.
(End)
a(n) is also the smallest positive number not among the terms between a(a(n-1)) and a(n-1) inclusive (with a(0)=1 prepended). - Neal Gersh Tolunsky, Mar 07 2023
REFERENCES
Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Eric Weisstein's World of Mathematics, Odd Part
FORMULA
G.f.: 1/x * Sum_{k>=0} x^2^k/(1-2*x^2^(k+1) + x^2^(k+2)). - Ralf Stephan, Jul 24 2003
a(2*n-1) = n and a(2*n) = a(n). - Pab Ter (pabrlos2(AT)yahoo.com), Oct 25 2005
G.f. satisfies g(x) = g(x^2) + x/(1-x^2)^2. - Robert Israel, Apr 24 2015
EXAMPLE
Start of table showing the interleaving with the positive integers:
n a(n) (n+1)/2 a(n/2)
1 1 1
2 1 1
3 2 2
4 1 1
5 3 3
6 2 2
7 4 4
8 1 1
9 5 5
10 3 3
11 6 6
12 2 2
(End)
MAPLE
A003602:=proc(n) options remember: if n mod 2 = 1 then RETURN((n+1)/2) else RETURN(procname(n/2)) fi: end proc:
seq( A003602(n), n=1..83); # Pab Ter
nmax := 83: for m from 0 to ceil(simplify(log[2](nmax))) do for k from 1 to ceil(nmax/(m+2)) do a((2*k-1)*2^m) := k od: od: seq(a(k), k=1..nmax); # Johannes W. Meijer, Feb 04 2013
a := 1;
for p in ifactors(n)[2] do
if op(1, p) > 2 then
a := a*op(1, p)^op(2, p) ;
end if;
end do :
(a+1)/2 ;
MATHEMATICA
a[n_] := Block[{m = n}, While[ EvenQ@m, m /= 2]; (m + 1)/2]; Array[a, 84] (* or *)
a[1] = 1; a[n_] := a[n] = If[OddQ@n, (n + 1)/2, a[n/2]]; Array[a, 84] (* Robert G. Wilson v, May 23 2006 *)
a[n_] := Ceiling[NestWhile[Floor[#/2] &, n, EvenQ]/2]; Array[a, 84] (* Birkas Gyorgy, Apr 05 2011 *)
a003602 = {1}; max = 7; Do[b = {}; Do[AppendTo[b, {k, a003602[[k]]}], {k, Length[a003602]}]; a003602 = Flatten[b], {n, 2, max}]; a003602 (* L. Edson Jeffery, Nov 21 2015 *)
PROG
(Haskell)
a003602 = (`div` 2) . (+ 1) . a000265
(Haskell)
import Data.List (transpose)
a003602 = flip div 2 . (+ 1) . a000265
a003602_list = concat $ transpose [[1..], a003602_list]
(Scheme) (define ( A003602 n) (let loop ((n n)) (if (even? n) (loop (/ n 2)) (/ (+ 1 n) 2)))) ;; Antti Karttunen, Feb 04 2015
(Python)
import math
def a(n): return (n/2**int(math.log(n - (n & n - 1), 2)) + 1)/2 # Indranil Ghosh, Apr 24 2017
(Python)
CROSSREFS
a(n) is the index of the column in A135764 where n appears (see also A054582).
Cf. A000079, A000265, A001511, A003603, A003961, A014577 (with offset 1, reduction mod 2), A025480, A035528, A048673, A101279, A110963, A117303, A126760, A181988, A220466, A249745, A253887, A337821 (2-adic valuation).
EXTENSIONS
More terms from Pab Ter (pabrlos2(AT)yahoo.com), Oct 25 2005
Möbius transform of Kimberling's paraphrases, A003602.
+10
20
1, 0, 1, 0, 2, 0, 3, 0, 3, 0, 5, 0, 6, 0, 4, 0, 8, 0, 9, 0, 6, 0, 11, 0, 10, 0, 9, 0, 14, 0, 15, 0, 10, 0, 12, 0, 18, 0, 12, 0, 20, 0, 21, 0, 12, 0, 23, 0, 21, 0, 16, 0, 26, 0, 20, 0, 18, 0, 29, 0, 30, 0, 18, 0, 24, 0, 33, 0, 22, 0, 35, 0, 36, 0, 20, 0, 30, 0, 39, 0, 27, 0, 41, 0, 32, 0, 28, 0, 44, 0, 36, 0, 30, 0, 36
FORMULA
a(1) = 1, a(n) = A000010(n)/2 for odd n > 1, a(n) = 0 for even n.
Sum_{k=1..n} a(k) ~ (1/Pi^2)*n^2. - Amiram Eldar, Jul 15 2023
MAPLE
with(numtheory): a:=proc(n) if n=1 then 1; elif n mod 2 = 0 then 0; else phi(n)/2; fi: end proc: seq(a(n), n=1..60); # Ridouane Oudra, Jul 13 2023
MATHEMATICA
k[n_] := (n/2^IntegerExponent[n, 2] + 1)/2; a[n_] := DivisorSum[n, MoebiusMu[#] * k[n/#] &]; Array[a, 100] (* Amiram Eldar, Nov 13 2021 *)
PROG
(PARI) A349136(n) = if(1==n, 1, if(n%2, eulerphi(n)/2, 0));
(PARI)
A003602(n) = (1+(n>>valuation(n, 2)))/2;
(Python)
from sympy import totient
CROSSREFS
Agrees with A055034 on odd arguments.
1, -2, -3, -1, -4, 4, -6, -2, -4, 5, -7, 3, -9, 7, 6, -4, -10, 8, -12, 4, 8, 8, -15, 8, -9, 10, -12, 6, -16, 5, -19, -8, 9, 11, 9, 8, -21, 13, 11, 11, -22, 11, -24, 7, 16, 16, -27, 20, -25, 18, 12, 9, -30, 32, 10, 17, 14, 17, -31, 6, -34, 20, 24, -16, 12, 14, -36, 10, 17, 20, -37, 16, -40, 22, 27, 12, 12, 20, -42, 28, -36, 23, -45, 12, 13
FORMULA
a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A048673(n/d) * a(d).
PROG
(PARI)
up_to = 20000;
DirInverse(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(d<n, v[n/d]*u[d], 0)))); (u) }; \\ Compute the Dirichlet inverse of the sequence given in input vector v.
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
v323893 = DirInverse(vector(up_to, n, A048673(n)));
(PARI)
memoA323893 = Map();
A323893(n) = if(1==n, 1, my(v); if(mapisdefined(memoA323893, n, &v), v, v = -sumdiv(n, d, if(d<n, A048673(n/d)* A323893(d), 0)); mapput(memoA323893, n, v); (v))); \\ Antti Karttunen, Nov 30 2024
Sum of Kimberling's paraphrases ( A003602) and its Dirichlet inverse.
+10
10
2, 0, 0, 1, 0, 4, 0, 1, 4, 6, 0, 2, 0, 8, 12, 1, 0, 6, 0, 3, 16, 12, 0, 2, 9, 14, 12, 4, 0, 4, 0, 1, 24, 18, 24, 5, 0, 20, 28, 3, 0, 6, 0, 6, 26, 24, 0, 2, 16, 17, 36, 7, 0, 16, 36, 4, 40, 30, 0, 8, 0, 32, 36, 1, 42, 10, 0, 9, 48, 12, 0, 5, 0, 38, 46, 10, 48, 12, 0, 3, 37, 42, 0, 11, 54, 44, 60, 6, 0, 20, 56, 12
COMMENTS
Question: Are all terms nonnegative?
The answer to the above question is no, because A323894 (which is a prime-shifted version of this sequence) also contains negative values. For example, for n=72747675, 88062975, 130945815, 111035925 we get here a(n) = -14126242, -17546656, -14460312, -22677277. The indices are obtained by prime-shifting with A003961 the four indices mentioned in the Apr 20 2022 comment of A323894. - Antti Karttunen, Nov 30 2024
FORMULA
a(1) = 2, and for n > 1, a(n) = -Sum_{d|n, 1<d<n} A003602(d) * A349134(n/d).
MATHEMATICA
k[n_] := (n/2^IntegerExponent[n, 2] + 1)/2; d[1] = 1; d[n_] := d[n] = -DivisorSum[n, d[#]*k[n/#] &, # < n &]; a[n_] := k[n] + d[n]; Array[a, 100] (* Amiram Eldar, Nov 13 2021 *)
PROG
(PARI)
up_to = 16384;
DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(d<n, v[n/d]*u[d], 0)))); (u) }; \\ Compute the Dirichlet inverse of the sequence given in input vector v.
A003602(n) = (1+(n>>valuation(n, 2)))/2;
v349134 = DirInverseCorrect(vector(up_to, n, A003602(n)));
(PARI)
A003602(n) = (1+(n>>valuation(n, 2)))/2;
memoA349134 = Map();
A349134(n) = if(1==n, 1, my(v); if(mapisdefined(memoA349134, n, &v), v, v = -sumdiv(n, d, if(d<n, A003602(n/d)* A349134(d), 0)); mapput(memoA349134, n, v); (v)));
Search completed in 0.011 seconds
|