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 11-20 of 154 results. Next

A347956 Dirichlet convolution of A003602 with A069359.

Original entry on oeis.org

0, 1, 1, 3, 1, 8, 1, 7, 5, 11, 1, 22, 1, 14, 13, 15, 1, 35, 1, 31, 16, 20, 1, 50, 8, 23, 20, 40, 1, 81, 1, 31, 22, 29, 19, 95, 1, 32, 25, 71, 1, 106, 1, 58, 62, 38, 1, 106, 11, 77, 31, 67, 1, 134, 25, 92, 34, 47, 1, 217, 1, 50, 78, 63, 28, 156, 1, 85, 40, 151, 1, 215, 1, 59, 95, 94, 28, 181, 1, 151, 74, 65, 1, 286, 34
Offset: 1

Views

Author

Antti Karttunen, Sep 20 2021

Keywords

Crossrefs

Programs

Formula

a(n) = Sum_{d|n} A003602(d) * A069359(n/d).

A349135 Sum of Kimberling's paraphrases (A003602) and its Dirichlet inverse.

Original entry on oeis.org

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
Offset: 1

Views

Author

Antti Karttunen, Nov 13 2021

Keywords

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

Crossrefs

Cf. A003602 (also quadrisection of this sequence), A349134, A323894 [= a(A003961(n))].
Cf. also A323882, A349126.

Programs

  • 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 *)
  • 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(dA003602(n) = (1+(n>>valuation(n,2)))/2;
    v349134 = DirInverseCorrect(vector(up_to,n,A003602(n)));
    A349134(n) = v349134[n];
    A349135(n) = (A003602(n)+A349134(n));
    
  • PARI
    A349135(n) = if(1==n,2,-sumdiv(n, d, if(1==d||n==d,0,A003602(d)*A349134(n/d)))); \\ (Demonstrates the "cut convolution" formula) - Antti Karttunen, Nov 13 2021
    
  • 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(dA003602(n/d)*A349134(d),0)); mapput(memoA349134,n,v); (v)));
    A349135(n) = (A003602(n)+A349134(n)); \\ Antti Karttunen, Nov 30 2024

Formula

a(n) = A003602(n) + A349134(n).
a(1) = 2, and for n > 1, a(n) = -Sum_{d|n, 1A003602(d) * A349134(n/d).
For all n >= 1, a(4*n) = A003602(n). - Antti Karttunen, Dec 07 2021

A246684 "Caves of prime shift" permutation: a(1) = 1, a(n) = A242378(A007814(n), 2*a(A003602(n))) - 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 7, 6, 9, 14, 15, 24, 13, 26, 11, 10, 17, 20, 27, 34, 29, 80, 47, 48, 25, 32, 51, 124, 21, 44, 19, 12, 33, 74, 39, 54, 53, 98, 67, 76, 57, 104, 159, 624, 93, 404, 95, 120, 49, 50, 63, 64, 101, 152, 247, 342, 41, 38, 87, 174, 37, 62, 23, 16, 65, 56, 147, 244, 77, 188, 107, 90, 105, 374, 195, 324, 133, 170, 151, 142, 113, 92
Offset: 1

Views

Author

Antti Karttunen, Sep 06 2014

Keywords

Comments

See the comments in A246676. This is otherwise similar permutation, except that after having reached an odd number 2m-1 when we have shifted the binary representation of n right k steps, here, in contrary to A246676, we don't shift the primes in the prime factorization of the even number 2m, but instead of an even number (2*a(m)), shifting it the same number (k) of positions towards larger primes, whose product is then decremented by one to get the final result.
From Antti Karttunen, Jan 18 2015: (Start)
This can be viewed as an entanglement or encoding permutation where the complementary pairs of sequences to be interwoven together are even and odd numbers (A005843/A005408) which are entangled with another complementary pair: even numbers in the order they appear in A253885 and odd numbers in their usual order: (A253885/A005408).
From the above follows also that this sequence can be represented as a binary tree. Each child to the left is obtained by doubling the parent and subtracting one, and each child to the right is obtained by applying A253885 to the parent:
1
|
...................2...................
3 4
5......../ \........8 7......../ \........6
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
9 14 15 24 13 26 11 10
17 20 27 34 29 80 47 48 25 32 51 124 21 44 19 12
(End)

Examples

			Consider n=30, "11110" in binary. It has to be shifted just one bit-position right that the result were an odd number 15, "1111" in binary. As 15 = 2*8-1, we use 2*a(8) = 2*6 = 12 = 2*2*3 = p_1 * p_1 * p_2 [where p_k denotes the k-th prime, A000040(k)], which we shift one step towards larger primes resulting p_2 * p_2 * p_3 = 3*3*5 = 45, thus a(30) = 45-1 = 44.
		

Crossrefs

Inverse: A246683.
Other versions: A246676, A246678.
Similar or related permutations: A005940, A163511, A241909, A245606, A246278, A246375, A249814, A250243.
Differs from A249814 for the first time at n=14, where a(14) = 26, while A249814(14) = 20.

Programs

  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
    A246684(n) = { my(k=0); if(1==n, 1, while(!(n%2), n = n/2; k++); n = 2*A246684((n+1)/2); while(k>0, n = A003961(n); k--); n-1); };
    for(n=1, 8192, write("b246684.txt", n, " ", A246684(n)));
    (Scheme, with memoization-macro definec, two implementations)
    (definec (A246684 n) (cond ((<= n 1) n) (else (+ -1 (A242378bi (A007814 n) (* 2 (A246684 (A003602 n)))))))) ;; Code for A242378bi given in A242378.
    (definec (A246684 n) (cond ((<= n 1) n) ((even? n) (A253885 (A246684 (/ n 2)))) (else (+ -1 (* 2 (A246684 (/ (+ n 1) 2)))))))

Formula

a(1) = 1, a(n) = A242378(A007814(n), 2*a(A003602(n))) - 1. [Where the bivariate function A242378(k,n) changes each prime p(i) in the prime factorization of n to p(i+k), i.e., it's the result of A003961 iterated k times starting from n].
a(1) = 1, a(2n) = A253885(a(n)), a(2n+1) = (2*a(n+1))-1. - Antti Karttunen, Jan 18 2015
As a composition of other permutations:
a(n) = A250243(A249814(n)).
Other identities. For all n >= 1, the following holds:
a(n) = (1+a((2*n)-1))/2. [The odd bisection from a(1) onward with one added and then halved gives the sequence back].
For all n >= 0, the following holds: a(A000051(n)) = A000051(n). [Numbers of the form 2^n + 1 are among the fixed points].

A249811 Permutation of natural numbers: a(n) = A249741(A001511(n), A003602(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 7, 6, 9, 14, 11, 24, 13, 20, 15, 10, 17, 26, 19, 34, 21, 32, 23, 48, 25, 38, 27, 54, 29, 44, 31, 12, 33, 50, 35, 64, 37, 56, 39, 76, 41, 62, 43, 84, 45, 68, 47, 120, 49, 74, 51, 94, 53, 80, 55, 90, 57, 86, 59, 114, 61, 92, 63, 16, 65, 98, 67, 124, 69, 104, 71, 118, 73, 110, 75, 144, 77, 116, 79, 142, 81
Offset: 1

Views

Author

Antti Karttunen, Nov 06 2014

Keywords

Comments

In the essence, a(n) tells which number in square array A249741 (the sieve of Eratosthenes minus 1) is at the same position where n is in array A135764, which is formed from odd numbers whose binary expansions are shifted successively leftwards on the successive rows. As the topmost row in both arrays is A005408 (odd numbers), they are fixed, i.e., a(2n+1) = 2n+1 for all n.
Equally: a(n) tells which number in array A114881 is at the same position where n is in the array A054582, as they are the transposes of above two arrays.

Crossrefs

Inverse: A249812.
Similar or related permutations: A249814 ("deep variant"), A246676, A249815, A114881, A209268, A249725, A249741.
Differs from A246676 for the first time at n=14, where a(14)=20, while
A246676(14)=26.

Programs

Formula

In the following formulas, A083221 and A249741 are interpreted as bivariate functions:
a(n) = A083221(A001511(n),A003602(n)) - 1 = A249741(A001511(n),A003602(n)).
As a composition of related permutations:
a(n) = A114881(A209268(n)).
a(n) = A249741(A249725(n)).
a(n) = A249815(A246676(n)).
Other identities. For all n >= 1 the following holds:
a(A000079(n-1)) = A006093(n).

A181988 If n is odd, a(n) = (n+1)/2; if n is even, a(n) = a(n/2) + A003602(n).

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 4, 4, 5, 6, 6, 6, 7, 8, 8, 5, 9, 10, 10, 9, 11, 12, 12, 8, 13, 14, 14, 12, 15, 16, 16, 6, 17, 18, 18, 15, 19, 20, 20, 12, 21, 22, 22, 18, 23, 24, 24, 10, 25, 26, 26, 21, 27, 28, 28, 16, 29, 30, 30, 24, 31, 32, 32, 7, 33, 34, 34, 27, 35, 36
Offset: 1

Views

Author

David Spies, Apr 04 2012

Keywords

Comments

The original definition was "Interleaved multiples of the positive integers".
This sequence is A_1 where A_k = Interleave(k*counting,A_(k+1)).
Show your friends the first 15 terms and see if they can guess term number 16. (If you want to be fair, you might want to show them A003602 first.) - David Spies, Sep 17 2012

Crossrefs

Programs

  • Haskell
    interleave (hdx : tlx) y = hdx : interleave y tlx
    oeis003602 = interleave [1..] oeis003602
    oeis181988 = interleave [1..] (zipWith (+) oeis003602 oeis181988)
    
  • Maple
    nmax:=70: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := n*(p+1) od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Jan 21 2013
  • Python
    from itertools import count
    def interleave(A):
        A1=next(A)
        A2=interleave(A)
        while True:
            yield next(A1)
            yield next(A2)
    def multiples(k):
        return (k*i for i in count(1))
    interleave(multiples(k) for k in count(1))
    
  • Python
    def A181988(n): return (m:=(n&-n).bit_length())*((n>>m)+1) # Chai Wah Wu, Jul 12 2022
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A181988 n) (if (even? n) (+ (A003602 n) (A181988 (/ n 2))) (A003602 n)))
    ;; Antti Karttunen, Jan 19 2016

Formula

a((2*n-1)*2^p) = n*(p+1), p >= 0.
a(n) = A001511(n)*A003602(n). - L. Edson Jeffery, Nov 21 2015. (Follows directly from above formula.) - Antti Karttunen, Jan 19 2016

Extensions

Definition replaced by a formula provided by David Spies, Sep 17 2012. N. J. A. Sloane, Nov 22 2015

A349370 Dirichlet convolution of Kimberling's paraphrases (A003602) with itself.

Original entry on oeis.org

1, 2, 4, 3, 6, 8, 8, 4, 14, 12, 12, 12, 14, 16, 28, 5, 18, 28, 20, 18, 38, 24, 24, 16, 35, 28, 48, 24, 30, 56, 32, 6, 58, 36, 60, 42, 38, 40, 68, 24, 42, 76, 44, 36, 108, 48, 48, 20, 66, 70, 88, 42, 54, 96, 92, 32, 98, 60, 60, 84, 62, 64, 148, 7, 108, 116, 68, 54, 118, 120, 72, 56, 74, 76, 176, 60, 126, 136, 80, 30
Offset: 1

Views

Author

Antti Karttunen, Nov 15 2021

Keywords

Crossrefs

Cf. A347954, A347955, A347956, A349136, A349371, A349372, A349373, A349374, A349375, A349390, A349431, A349444, A349447 for Dirichlet convolutions of other sequences with A003602.

Programs

  • Mathematica
    k[n_] := (n / 2^IntegerExponent[n, 2] + 1)/2; a[n_] := DivisorSum[n, k[#] * k[n/#] &]; Array[a, 100] (* Amiram Eldar, Nov 16 2021 *)
  • PARI
    A003602(n) = (1+(n>>valuation(n,2)))/2;
    A349370(n) = sumdiv(n,d,A003602(n/d)*A003602(d));

Formula

a(n) = Sum_{d|n} A003602(n/d) * A003602(d).

A349372 Dirichlet convolution of Kimberling's paraphrases (A003602) with tau (number of divisors, A000005).

Original entry on oeis.org

1, 3, 4, 6, 5, 12, 6, 10, 12, 15, 8, 24, 9, 18, 22, 15, 11, 36, 12, 30, 27, 24, 14, 40, 22, 27, 34, 36, 17, 66, 18, 21, 37, 33, 36, 72, 21, 36, 42, 50, 23, 81, 24, 48, 72, 42, 26, 60, 36, 66, 52, 54, 29, 102, 50, 60, 57, 51, 32, 132, 33, 54, 90, 28, 57, 111, 36, 66, 67, 108, 38, 120, 39, 63, 104, 72, 63, 126, 42, 75
Offset: 1

Views

Author

Antti Karttunen, Nov 15 2021

Keywords

Crossrefs

Cf. A347954, A347955, A347956, A349136, A349370, A349371, A349373, A349374, A349375, A349390, A349431, A349444, A349447 for Dirichlet convolutions of other sequences with A003602.
Cf. also A349392.

Programs

  • Mathematica
    k[n_] := (n / 2^IntegerExponent[n, 2] + 1)/2; a[n_] := DivisorSum[n, k[#] * DivisorSigma[0, n/#] &]; Array[a, 100] (* Amiram Eldar, Nov 16 2021 *)
  • PARI
    A003602(n) = (1+(n>>valuation(n,2)))/2;
    A349372(n) = sumdiv(n,d,A003602(n/d)*numdiv(d));

Formula

a(n) = Sum_{d|n} A003602(n/d) * A000005(d).

A349375 Dirichlet convolution of Kimberling's paraphrases (A003602) with Liouville's lambda.

Original entry on oeis.org

1, 0, 1, 1, 2, 0, 3, 0, 4, 0, 5, 1, 6, 0, 4, 1, 8, 0, 9, 2, 6, 0, 11, 0, 11, 0, 10, 3, 14, 0, 15, 0, 10, 0, 12, 4, 18, 0, 12, 0, 20, 0, 21, 5, 14, 0, 23, 1, 22, 0, 16, 6, 26, 0, 20, 0, 18, 0, 29, 4, 30, 0, 21, 1, 24, 0, 33, 8, 22, 0, 35, 0, 36, 0, 21, 9, 30, 0, 39, 2, 31, 0, 41, 6, 32, 0, 28, 0, 44, 0, 36, 11, 30, 0, 36
Offset: 1

Views

Author

Antti Karttunen, Nov 15 2021

Keywords

Crossrefs

Cf. A347954, A347955, A347956, A349136, A349370, A349371, A349372, A349373, A349374, A349390, A349431, A349444, A349447 for Dirichlet convolutions of other sequences with A003602.
Cf. also A349395.

Programs

  • Mathematica
    k[n_] := (n / 2^IntegerExponent[n, 2] + 1)/2; a[n_] := DivisorSum[n, k[#] * LiouvilleLambda[n/#] &]; Array[a, 100] (* Amiram Eldar, Nov 16 2021 *)
  • PARI
    A003602(n) = (1+(n>>valuation(n,2)))/2;
    A008836(n) = ((-1)^bigomega(n));
    A349375(n) = sumdiv(n,d,A003602(n/d)*A008836(d));

Formula

a(n) = Sum_{d|n} A003602(n/d) * A008836(d).

A254055 Square array: A(row,col) = A003602(A254051(row,col)), read by antidiagonals A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

1, 2, 1, 1, 1, 3, 2, 6, 12, 4, 4, 9, 1, 9, 21, 5, 3, 13, 48, 102, 31, 3, 7, 30, 75, 36, 10, 183, 2, 15, 39, 6, 112, 426, 912, 274, 7, 18, 22, 58, 264, 669, 160, 684, 1641, 8, 10, 7, 129, 345, 198, 1003, 3828, 8202, 2461, 1, 6, 57, 156, 193, 517, 2370, 6015, 2871, 3076, 14763, 5, 24, 66, 85, 117, 1155, 3099, 889, 9022, 34446, 73812, 22144
Offset: 1

Views

Author

Antti Karttunen, Jan 27 2015

Keywords

Comments

Starting with an odd number x = A135765(row,col), the result after one combined Collatz step (3x+1)/2 is found in A254051(row+1,col), and after iterated [i.e., we divide all powers of 2 out] Collatz step: x_new <- A139391(x) = A000265(3x+1) the resulting odd number x_new is located A135764(1,A(row+1,col)).
What the resulting odd number will be, is given by A254101(row+1,col).

Examples

			The top left corner of the array:
    1,   2,    1,    2,    4,    5,     3,     2,    7,    8,     1, ...
    1,   1,    6,    9,    3,    7,    15,    18,   10,    6,    24, ...
    3,  12,    1,   13,   30,   39,    22,     7,   57,   66,    18, ...
    4,   9,   48,   75,    6,   58,   129,   156,   85,   25,   210, ...
   21, 102,   36,  112,  264,  345,   193,   117,  507,  588,    79, ...
   31,  10,  426,  669,  198,  517,  1155,  1398,  760,  441,  1884, ...
  183, 912,  160, 1003, 2370, 3099,  1732,    66, 4557, 5286,  1413, ...
  274, 684, 3828, 6015,  889, 4648, 10389, 12576, 6835,  496, 16950, ...
etc.
		

Crossrefs

A349374 Dirichlet convolution of Kimberling's paraphrases (A003602) with squarefree part of n (A007913).

Original entry on oeis.org

1, 3, 5, 4, 8, 15, 11, 6, 12, 24, 17, 20, 20, 33, 42, 7, 26, 36, 29, 32, 58, 51, 35, 30, 29, 60, 34, 44, 44, 126, 47, 9, 90, 78, 94, 48, 56, 87, 106, 48, 62, 174, 65, 68, 110, 105, 71, 35, 54, 87, 138, 80, 80, 102, 146, 66, 154, 132, 89, 168, 92, 141, 153, 10, 172, 270, 101, 104, 186, 282, 107, 72, 110, 168, 167, 116
Offset: 1

Views

Author

Antti Karttunen, Nov 15 2021

Keywords

Crossrefs

Cf. A347954, A347955, A347956, A349136, A349370, A349371, A349372, A349374, A349375, A349390, A349431, A349444, A349447 for Dirichlet convolutions of other sequences with A003602.

Programs

  • Mathematica
    f[p_, e_] := p^Mod[e, 2]; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; k[n_] := (n / 2^IntegerExponent[n, 2] + 1)/2; a[n_] := DivisorSum[n, k[#] * s[n/#] &]; Array[a, 100] (* Amiram Eldar, Nov 16 2021 *)
  • PARI
    A003602(n) = (1+(n>>valuation(n,2)))/2;
    A349374(n) = sumdiv(n,d,A003602(n/d)*core(d));

Formula

a(n) = Sum_{d|n} A003602(n/d) * A007913(d).
Previous Showing 11-20 of 154 results. Next