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 71-80 of 118 results. Next

A349398 Dirichlet convolution of A048673 with the Dirichlet inverse of its inverse permutation.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, -5, 8, 0, -6, -3, 2, 0, 19, -5, -4, -4, 20, -19, 22, 6, -15, 3, -8, 0, 0, 16, 16, -18, 24, -40, 70, 9, -24, 21, -7, -50, 55, 8, -24, 6, -41, -15, 58, 20, -17, -31, 108, 27, 70, -37, -24, 0, -20, -49, -98, 6, 26, -13, 21, -15, 62, 158, 84, -22, 9, -49, 130, -67, 12, -49, 62, -29, 112, 4, -60, 103, 16
Offset: 1

Views

Author

Antti Karttunen, Nov 19 2021

Keywords

Comments

Dirichlet convolution of A048673 with A349358, which is the Dirichlet inverse of A064216 (inverse permutation of A048673). Therefore, convolving A064216 with this sequence gives A048673.
Note how for n = 1 .. 35, a(n) = -A349397(n).

Crossrefs

Cf. A003961, A048673, A064216, A064989, A323893, A349397 (Dirichlet inverse), A349399 (sum with it).
Cf. also A349376, A349377, A349385.

Programs

  • PARI
    A048673(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (1/2)*(1+factorback(f)); };
    A064216(n) = { my(f = factor(n+n-1)); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f); };
    memoA349358 = Map();
    A349358(n) = if(1==n,1,my(v); if(mapisdefined(memoA349358,n,&v), v, v = -sumdiv(n,d,if(dA064216(n/d)*A349358(d),0)); mapput(memoA349358,n,v); (v)));
    A349398(n) = sumdiv(n,d,A048673(n/d)*A349358(d));

Formula

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

A245449 Fixed points of A245447 and A245448.

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 13, 25, 26, 30, 33, 53, 93, 1023, 1034, 1203, 1330, 2657, 8584, 17159, 779212, 970225, 1558409, 8550146, 240902643, 244608573, 325422273, 414690595, 570131490, 1020233393, 1864797542, 2438037206
Offset: 1

Views

Author

Antti Karttunen, Jul 22 2014

Keywords

Comments

First apply A003961(n), where the primes in the prime factorization of natural number n are shifted one step left [i.e. each p_i changes to p_{i+1}]. Then increment the resulting odd number by one to get an even number, which is divided by 2, and the same three operations are done second time to that quotient. This sequence consists of such numbers for which the final result is equal to the original n which we started from.
8550146 is the largest term <= 123456789.
Numbers which are in 1- and 2-cycles of A048673 and A064216.

Examples

			For n = 30 = 2*3*5 = p_1 * p_2 * p_3, the first shift operation results p_2 * p_3 * p_4 = 3*5*7 = 105, and (105+1)/2 = 53, which is the 16th prime, p_16. Shifting this once left results p_17 = 59, and (59+1)/2 = 30 again. Thus 30 is included in the sequence. For the same reason 53 is also included in the sequence.
		

Crossrefs

A048674 is a subsequence.

Programs

Extensions

a(25)-a(32) added by Antti Karttunen, Sep 13 2014

A246376 Permutation of natural numbers: a(1) = 1, a(2n) = 2 * a(n), a(2n-1) = 1 + (2 * a(A064989(2n-1)-1)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 7, 10, 13, 12, 21, 18, 11, 16, 25, 14, 33, 20, 15, 26, 29, 24, 17, 42, 19, 36, 53, 22, 73, 32, 43, 50, 37, 28, 45, 66, 31, 40, 57, 30, 81, 52, 27, 58, 61, 48, 49, 34, 35, 84, 117, 38, 41, 72, 87, 106, 169, 44, 213, 146, 67, 64, 65, 86, 89, 100, 91, 74, 173, 56, 149, 90, 51, 132, 101, 62, 113, 80, 23
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2014

Keywords

Crossrefs

Inverse: A246375.
Similar or related permutations: A005940, A005941, A064216, A243071, A245605, A246377, A246380.

Formula

a(1) = 1, a(2n) = 2 * a(n), a(2n-1) = 1 + (2 * a(A064989(2n-1)-1)).
As a composition of related permutations:
a(n) = A246377(A246380(n)).
Other identities. For all n >= 1 the following holds:
A000035(a(n)) = A000035(n). [Like A005940 & A005941, this also preserves the parity].

A250472 Permutation of natural numbers: a(n) = A250470(2*n - 1).

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 11, 6, 13, 17, 8, 19, 9, 10, 23, 29, 12, 15, 31, 14, 37, 41, 16, 43, 25, 18, 47, 21, 20, 53, 59, 22, 27, 61, 24, 67, 71, 26, 35, 73, 28, 79, 33, 30, 83, 55, 32, 39, 89, 34, 97, 101, 36, 103, 107, 38, 109, 45, 40, 65, 49, 42, 51, 113, 44, 127, 85, 46, 131, 137, 48, 77, 57, 50, 139, 149, 52, 63, 151, 54, 95, 157, 56, 163, 121, 58, 167, 69, 60
Offset: 1

Views

Author

Antti Karttunen, Dec 06 2014

Keywords

Comments

For n > 1, a(n) tells which number is located immediately above n in the sieve of Eratosthenes (see A083140, A083221) in the same column of the sieve that contains 2n - 1.

Crossrefs

Inverse: A250471.
Odd bisection of A250470. The other bisection: A250479.

Formula

a(1) = 1, a(n) = A083221(A055396(2*n - 1)-1, A078898(2*n - 1)).
a(n) = A250470(2*n - 1).

A292245 Base-2 expansion of a(n) encodes the steps where numbers of the form 3k+1 are encountered when map x -> A253889(x) is iterated down to 1, starting from x=n.

Original entry on oeis.org

1, 2, 2, 5, 4, 4, 11, 4, 8, 17, 10, 18, 9, 8, 22, 17, 8, 8, 17, 22, 36, 41, 8, 42, 17, 16, 44, 21, 34, 32, 35, 20, 32, 33, 36, 64, 69, 18, 34, 73, 16, 74, 37, 44, 82, 33, 34, 34, 89, 16, 64, 69, 16, 68, 65, 34, 64, 33, 44, 64, 33, 72, 16, 65, 82, 68, 85, 16, 128, 137, 84, 72, 69, 34, 138, 145, 32, 84, 145, 88, 88, 149, 42, 162, 65, 68, 164, 45, 64
Offset: 1

Views

Author

Antti Karttunen, Sep 15 2017

Keywords

Examples

			For n=1 (the termination value of the iteration), 1 is of the form 3k+1, thus a(1) = 1*(2^0) = 1.
For n=2, 2 is not of the form 3k+1, while A253889(2) = 1 is, thus a(2) = 0*(2^0) + 1*2(^1) = 2.
For n=4, 4 is of the form 3k+1, while A253889(4) = 2 is not, but then A253889(2) = 1 again is, thus a(4) = 1*(2^0) + 0*(2^1) + 1*(2^2) = 5.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1]; g[n_] := (Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ n; Map[FromDigits[#, 2] &[IntegerDigits[#, 3] /. 2 -> 0] &, Array[a, 98]] (* Michael De Vlieger, Sep 16 2017 *)

Formula

a(1) = 1; for n > 1, a(n) = 2*a(A253889(n)) + [n ≡ 1 (mod 3)], where the last part of the formula is Iverson bracket, giving 1 only if n is of the form 3k+1, and 0 otherwise.
a(n) = A289813(A292243(n)).
Other identities. For all n >= 1:
a(A048673(n)) = A292248(n).
a(n) + A292244(n) = A064216(n).
a(n) AND A292244(n) = a(n) AND A292246(n) = 0, where AND is a bitwise-AND (A004198).

A246373 Primes p such that if 2p-1 = product_{k >= 1} A000040(k)^(c_k), then p <= product_{k >= 1} A000040(k-1)^(c_k).

Original entry on oeis.org

2, 3, 7, 19, 29, 31, 37, 47, 67, 71, 79, 89, 97, 101, 103, 107, 109, 127, 139, 151, 157, 181, 191, 197, 199, 211, 223, 227, 229, 241, 251, 269, 271, 277, 283, 307, 317, 331, 337, 349, 359, 367, 373, 379, 397, 409, 421, 433, 439, 457, 461, 467, 487, 499, 521, 541, 547, 569, 571, 577, 601
Offset: 1

Views

Author

Antti Karttunen, Aug 25 2014

Keywords

Comments

Primes p such that A064216(p) >= p, or equally, A064989(2p-1) >= p.
All primes of A005382 are present here, because if 2p-1 is prime q, Bertrand's postulate guarantees (after cases 2 and 3 which are in A048674) that there exists at least one prime r larger than p and less than q = 2p-1, for which A064989(q) = r.

Examples

			2 is present, as 2*2 - 1 = 3 = p_2, and p_{2-1} = p_1 = 2 >= 2.
3 is present, as 2*3 - 1 = 5 = p_3, and p_{3-1} = p_2 = 3 >= 3.
5 is not present, as 2*5 - 1 = 9 = p_2 * p_2, and p_1 * p_1 = 4, with 4 < 5.
7 is present, as 2*7 - 1 = 13 = p_6, and p_5 = 11 >= 7.
		

Crossrefs

Intersection of A000040 and A246372.
Subsequence: A005382.
A246374 gives the primes not here.

Programs

  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    n = 0; forprime(p=2,2^31, if((A064989((2*p)-1) >= p), n++; write("b246373.txt", n, " ", p); if(n > 9999, break)));
    (Scheme, with Antti Karttunen's IntSeq-library)
    (define A246373 (MATCHING-POS 1 1 (lambda (n) (and (prime? n) (>= (A064216 n) n)))))

A249734 Even bisection of A003961: Replace in 2n each prime factor p(k) with prime p(k+1).

Original entry on oeis.org

3, 9, 15, 27, 21, 45, 33, 81, 75, 63, 39, 135, 51, 99, 105, 243, 57, 225, 69, 189, 165, 117, 87, 405, 147, 153, 375, 297, 93, 315, 111, 729, 195, 171, 231, 675, 123, 207, 255, 567, 129, 495, 141, 351, 525, 261, 159, 1215, 363, 441, 285, 459, 177, 1125, 273, 891, 345, 279, 183, 945, 201, 333, 825, 2187, 357, 585, 213, 513, 435, 693, 219, 2025, 237, 369
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2014

Keywords

Crossrefs

Row 2 of A246278.
Cf. A249735 (the other bisection of A003961).
Cf. also A000079, A000244.

Formula

a(n) = A003961(2*n).
a(n) = 3 * A003961(n).
a(n) = A064989(A249827(n)).
a(n) = A003961(A243501(A064216(n))).
a(n) = A003961(A243502(A048673(n))).
a(n) = A016945(A048673(n)-1). [Permutation of A016945, 6n+3.]
Other identities. For all n >= 1:
a(A000079(n-1)) = A000244(n). [Maps each 2^n to 3^(n+1).]

A292243 a(1) = 1; for n > 1, a(n) = 3*a(A253889(n)) + (n mod 3).

Original entry on oeis.org

1, 5, 3, 16, 17, 9, 49, 11, 33, 160, 50, 156, 52, 53, 147, 88, 29, 27, 82, 149, 474, 457, 35, 453, 106, 101, 441, 151, 482, 303, 265, 152, 483, 250, 470, 1449, 1441, 158, 480, 1429, 161, 1407, 469, 443, 1371, 298, 266, 318, 1348, 89, 969, 961, 83, 954, 910, 248, 897, 268, 449, 1455, 322, 1424, 99, 808, 1373, 738, 1366, 107
Offset: 1

Views

Author

Antti Karttunen, Sep 15 2017

Keywords

Comments

a(n) encodes in its base-3 representation the succession of modulo 3 residues obtained when map x -> A253889(x), starting from x=n, is iterated down to the eventual 1.

Crossrefs

Programs

  • Mathematica
    f[n_] := Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1]; g[n_] := (Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ n; a[1] = 1; a[n_] := a[n] = 3 a[Floor@ g[Floor[f[n]/2]]] + Mod[n, 3]; Array[a, 68] (* Michael De Vlieger, Sep 16 2017 *)
  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From Michel Marcus
    A048673(n) = (A003961(n)+1)/2;
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A064216(n) = A064989((2*n)-1);
    A253889(n) = if(1==n,n,A048673(A064216(n)\2));
    A292243(n) = if(1==n,n,((n%3) + 3*A292243(A253889(n))));
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A292243 n) (if (= 1 n) n (+ (modulo n 3) (* 3 (A292243 (A253889 n))))))

Formula

a(1) = 1; for n > 1, a(n) = 3*a(A253889(n)) + A010872(n).

A245707 Permutation of natural numbers, the odd bisection of A245605 incremented by one and halved: a(n) = (1+A245605((2*n)-1))/2.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 9, 6, 19, 13, 8, 35, 11, 10, 17, 21, 18, 27, 139, 16, 23, 33, 14, 555, 51, 22, 37, 75, 36, 29, 105, 26, 67, 147, 278, 71, 165, 38, 53, 587, 12, 107, 83, 28, 25, 2219, 72, 43, 73, 20, 87, 41, 34, 291, 277, 210, 163, 31, 66, 149, 131, 330, 15, 229, 24, 39, 2347, 70, 49, 101
Offset: 1

Views

Author

Antti Karttunen, Jul 30 2014

Keywords

Crossrefs

Programs

Formula

a(n) = (1+A245605((2*n)-1))/2.
As a composition of related permutations:
a(1) = 1, and for n > 1, a(n) = 1+A245605(A064216(n)-1).
a(n) = A245706(A245607(n)).

A246380 Permutation of natural numbers: a(1) = 1, a(2n) = nthcomposite(a(n)), a(2n-1) = nthprime(a(A064989(2n-1)-1)), where nthprime = A000040, nthcomposite = A002808, and A064989(n) shifts the prime factorization of n one step towards smaller primes.

Original entry on oeis.org

1, 4, 2, 9, 7, 6, 23, 16, 3, 14, 13, 12, 43, 35, 17, 26, 37, 8, 101, 24, 5, 22, 19, 21, 53, 62, 83, 51, 79, 27, 233, 39, 191, 54, 149, 15, 103, 134, 11, 36, 47, 10, 151, 34, 41, 30, 29, 33, 73, 75, 241, 86, 113, 114, 89, 72, 1153, 108, 443, 40, 593, 296, 547, 56, 167, 245, 173, 76, 563, 194, 1553, 25
Offset: 1

Views

Author

Antti Karttunen, Aug 29 2014

Keywords

Comments

Has an infinite number of infinite cycles. See comments in A246379.

Crossrefs

Inverse: A246379.
Similar or related permutations: A246376, A246378, A246363, A246364, A246366, A246368, A064216, A246682.

Programs

  • PARI
    default(primelimit,(2^31)+(2^30));
    A002808(n) = { my(k=-1); while( -n + n += -k + k=primepi(n), ); n }; \\ This function from M. F. Hasler
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A246380(n) = if(1==n, 1, if(!(n%2), A002808(A246380(n/2)), prime(A246380(A064989(n)-1))));
    for(n=1, 3098, write("b246380.txt", n, " ", A246380(n)));
    (Scheme, with memoization-macro definec)
    (definec (A246380 n) (cond ((< n 2) n) ((even? n) (A002808 (A246380 (/ n 2)))) (else (A000040 (A246380 (- (A064989 n) 1))))))

Formula

a(1) = 1, a(2n) = nthcomposite(a(n)), a(2n-1) = nthprime(a(A064989(2n-1)-1)), where nthprime = A000040, nthcomposite = A002808, and A064989(n) shifts the prime factorization of n one step towards smaller primes.
As a composition of related permutations:
a(n) = A246378(A246376(n)).
Other identities. For all n > 1 the following holds:
A010051(a(n)) = A000035(n). [Maps odd numbers larger than one to primes, and even numbers to composites, in some order. Permutations A246378 & A246682 have the same property].
Previous Showing 71-80 of 118 results. Next