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.

Showing 1-10 of 195 results. Next

A064216 Replace each p^e with prevprime(p)^e in the prime factorization of odd numbers; inverse of sequence A048673 considered as a permutation of the natural numbers.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 11, 6, 13, 17, 10, 19, 9, 8, 23, 29, 14, 15, 31, 22, 37, 41, 12, 43, 25, 26, 47, 21, 34, 53, 59, 20, 33, 61, 38, 67, 71, 18, 35, 73, 16, 79, 39, 46, 83, 55, 58, 51, 89, 28, 97, 101, 30, 103, 107, 62, 109, 57, 44, 65, 49, 74, 27, 113, 82, 127, 85, 24, 131
Offset: 1

Views

Author

Howard A. Landman, Sep 21 2001

Keywords

Comments

a((A003961(n) + 1) / 2) = n and A003961(a(n)) = 2*n - 1 for all n. If the sequence is indexed by odd numbers only, it becomes multiplicative. In this variant sequence, denoted b, even indices don't exist, and we get b(1) = a(1) = 1, b(3) = a(2) = 2, b(5) = 3, b(7) = 5, b(9) = 4 = b(3) * b(3), ... , b(15) = 6 = b(3) * b(5), and so on. This property can also be stated as: a(x) * a(y) = a(((2x - 1) * (2y - 1) + 1) / 2) for x, y > 0. - Reinhard Zumkeller [re-expressed by Peter Munn, May 23 2020]
Not multiplicative in usual sense - but letting m=2n-1=product_j (p_j)^(e_j) then a(n)=a((m+1)/2)=product_j (p_(j-1))^(e_j). - Henry Bottomley, Apr 15 2005
From Antti Karttunen, Jul 25 2016: (Start)
Several permutations that use prime shift operation A064989 in their definition yield a permutation obtained from their odd bisection when composed with this permutation from the right. For example, we have:
A243505(n) = A122111(a(n)).
A243065(n) = A241909(a(n)).
A244153(n) = A156552(a(n)).
A245611(n) = A243071(a(n)).
(End)

Examples

			For n=11, the 11th odd number is 2*11 - 1 = 21 = 3^1 * 7^1. Replacing the primes 3 and 7 with the previous primes 2 and 5 gives 2^1 * 5^1 = 10, so a(11) = 10. - _Michael B. Porter_, Jul 25 2016
		

Crossrefs

Odd bisection of A064989 and A252463.
Row 1 of A251721, Row 2 of A249821.
Cf. A048673 (inverse permutation), A048674 (fixed points).
Cf. A246361 (numbers n such that a(n) <= n.)
Cf. A246362 (numbers n such that a(n) > n.)
Cf. A246371 (numbers n such that a(n) < n.)
Cf. A246372 (numbers n such that a(n) >= n.)
Cf. A246373 (primes p such that a(p) >= p.)
Cf. A246374 (primes p such that a(p) < p.)
Cf. A246343 (iterates starting from n=12.)
Cf. A246345 (iterates starting from n=16.)
Cf. A245448 (this permutation "squared", a(a(n)).)
Cf. A253894, A254044, A254045 (binary width, weight and the number of nonleading zeros in base-2 representation of a(n), respectively).
Cf. A285702, A285703 (phi and sigma applied to a(n).)
Here obviously the variant 2, A151799(n) = A007917(n-1), of the prevprime function is used.
Cf. also A003961, A270430, A270431.

Programs

  • Mathematica
    Table[Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1], {n, 69}] (* Michael De Vlieger, Dec 18 2014, revised Mar 17 2016 *)
  • PARI
    a(n) = {my(f = factor(2*n-1)); for (k=1, #f~, f[k,1] = precprime(f[k,1]-1)); factorback(f);} \\ Michel Marcus, Mar 17 2016
    
  • Python
    from sympy import factorint, prevprime
    from operator import mul
    def a(n):
        f=factorint(2*n - 1)
        return 1 if n==1 else reduce(mul, [prevprime(i)**f[i] for i in f]) # Indranil Ghosh, May 13 2017
  • Scheme
    (define (A064216 n) (A064989 (- (+ n n) 1))) ;; Antti Karttunen, May 12 2014
    

Formula

a(n) = A064989(2n - 1). - Antti Karttunen, May 12 2014
Sum_{k=1..n} a(k) ~ c * n^2, where c = Product_{p prime > 2} ((p^2-p)/(p^2-q(p))) = 0.6621117868..., where q(p) = prevprime(p) (A151799). - Amiram Eldar, Jan 21 2023

Extensions

More terms from Reinhard Zumkeller, Sep 26 2001
Additional description added by Antti Karttunen, May 12 2014

A245612 Permutation of natural numbers: a(0) = 1, a(1) = 2, a(2n) = 3*a(n)-1, a(2n+1) = A254049(a(n)); composition of A048673 and A163511.

Original entry on oeis.org

1, 2, 5, 3, 14, 13, 8, 4, 41, 63, 38, 25, 23, 18, 11, 6, 122, 313, 188, 172, 113, 123, 74, 61, 68, 88, 53, 39, 32, 28, 17, 7, 365, 1563, 938, 1201, 563, 858, 515, 666, 338, 613, 368, 424, 221, 303, 182, 85, 203, 438, 263, 270, 158, 193, 116, 72, 95, 138, 83, 46, 50, 33, 20, 9
Offset: 0

Views

Author

Antti Karttunen, Jul 28 2014

Keywords

Comments

Note the indexing: the domain starts from 0, while the range excludes zero.
From Antti Karttunen, Jul 25 2016: (Start)
This sequence can be represented as a binary tree. Each left hand child is obtained by applying A016789(n-1) when the parent contains n (i.e., multiply by 3, subtract one), and each right hand child is obtained by applying A254049 to the parent's contents:
1
|
...................2...................
5 3
14......../ \........13 8......../ \........4
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
41 63 38 25 23 18 11 6
122 313 188 172 113 123 74 61 68 88 53 39 32 28 17 7
etc.
(End)

Crossrefs

Programs

  • Mathematica
    Table[(Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ If[n == 0, 1, Prime[#] Product[Prime[m]^(Map[Ceiling[(Length@ # - 1)/2] &, DeleteCases[Split@ Join[Riffle[IntegerDigits[n, 2], 0], {0}], {k__} /; k == 1]][[-m]]), {m, #}] &[DigitCount[n, 2, 1]]], {n, 0, 63}] (* Michael De Vlieger, Jul 25 2016 *)
  • Scheme
    (define (A245612 n) (A048673 (A163511 n))) ;; offset 0, a(0) = 1.

Formula

a(n) = A048673(A163511(n)).
a(0) = 1, a(1) = 2, a(2n) = 3*a(n)-1, a(2n+1) = A254049(a(n)). - Antti Karttunen, Jul 25 2016

A048674 Fixed points of A048673 and A064216: Numbers n such that if n = product_{k >= 1} (p_k)^(c_k), then Product_{k >= 1} (p_{k+1})^(c_k) = (2*n)-1, where p_k indicates the k-th prime, A000040(k).

Original entry on oeis.org

1, 2, 3, 25, 26, 33, 93, 1034, 970225, 8550146, 325422273, 414690595, 1864797542, 2438037206
Offset: 1

Views

Author

Antti Karttunen, Jul 14 1999

Keywords

Comments

Equally: after 1, numbers n such that, if the prime factorization of 2n-1 = Product_{k >= 1} (p_k)^(c_k) then Product_{k >= 1} (p_{k-1})^(c_k) = n.
Factorization of the initial terms: 1, 2, 3, 5^2, 2*13, 3*11, 3*31, 2*11*47, 5^2*197^2, 2*11*47*8269, 3*11*797*12373, 5*11^2*433*1583, 2*23*59*101*6803, 2*11*53*1201*1741.
The only 3-cycle of permutation A048673 in range 1 .. 402653184 is (2821 3460 5639).
For 2-cycles, take setwise difference of A245449 and this sequence.
Numbers k for which A336853(k) = k-1. - Antti Karttunen, Nov 26 2021

Examples

			25 is present, as 2*25 - 1 = 49 = p_4^2, and p_3^2 = 5*5 = 25.
26 is present, as 2*26 - 1 = 51 = 3*17 = p_2 * p_8, and p_1 * p_7 = 2*13 = 26.
Alternatively, as 26 = 2*13 = p_1 * p_7, and ((p_2 * p_8)+1)/2 = ((3*17)+1)/2 = 26 also, thus 26 is present.
		

Crossrefs

Fixed points of permutation pair A048673/A064216.
Positions of zeros in A349573.
Subsequence of the following sequences: A245449, A269860, A319630, A349622, A378980 (see also A379216).
This sequence is also obtained as a setwise difference of the following pairs of sequences: A246281 \ A246351, A246352 \ A246282, A246361 \ A246371, A246372 \ A246362.
Cf. also A348514 (fixed points of map A108228, similar to A048673).

Programs

  • Maple
    A048673 := n -> (A003961(n)+1)/2;
    A048674list := proc(upto_n) local b,i; b := [ ]; for i from 1 to upto_n do if(A048673(i) = i) then b := [ op(b), i ]; fi; od: RETURN(b); end;
  • Mathematica
    Join[{1}, Reap[For[n = 1, n < 10^7, n++, ff = FactorInteger[n]; If[Times @@ Power @@@ (NextPrime[ff[[All, 1]]]^ff[[All, 2]]) == 2 n - 1, Print[n]; Sow[n]]]][[2, 1]]] (* Jean-François Alcover, Mar 04 2016 *)
  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    isA048674(n) = ((n+n)==(1+A003961(n))); \\ Antti Karttunen, Nov 26 2021

Extensions

Entry revised and the names in Maple-code cleaned by Antti Karttunen, Aug 25 2014
Terms a(11) - a(14) added by Antti Karttunen, Sep 11-13 2014

A244154 Permutation of natural numbers: a(0) = 1, a(1) = 2, a(2n) = A254049(a(n)), a(2n+1) = 3*a(n)-1; composition of A048673 and A005940.

Original entry on oeis.org

1, 2, 3, 5, 4, 8, 13, 14, 6, 11, 18, 23, 25, 38, 63, 41, 7, 17, 28, 32, 39, 53, 88, 68, 61, 74, 123, 113, 172, 188, 313, 122, 9, 20, 33, 50, 46, 83, 138, 95, 72, 116, 193, 158, 270, 263, 438, 203, 85, 182, 303, 221, 424, 368, 613, 338, 666, 515, 858, 563, 1201, 938, 1563, 365, 10, 26, 43, 59, 60
Offset: 0

Views

Author

Antti Karttunen, Jun 27 2014

Keywords

Comments

Note the indexing: the domain starts from 0, while the range excludes zero.
From Antti Karttunen, May 30 2017: (Start)
This sequence can be represented as a binary tree. Each left hand child is obtained by applying A254049(n) when the parent contains n, and each right hand child is obtained by applying A016789(n-1) (i.e., multiply by 3, subtract one) to the parent's contents:
1
|
...................2...................
3 5
4......../ \........8 13......../ \........14
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
6 11 18 23 25 38 63 41
7 17 28 32 39 53 88 68 61 74 123 113 172 188 313 122
etc.
This is a mirror image of the tree depicted in A245612.
(End)

Crossrefs

Programs

Formula

a(n) = A048673(A005940(n+1)).
From Antti Karttunen, May 30 2017: (Start)
a(0) = 1, a(1) = 2, a(2n) = A254049(a(n)), a(2n+1) = 3*a(n)-1.
a(n) = A245612(A054429(n)).
(End)

A254049 Odd bisection of A048673: a(n) = A048673(2*n-1).

Original entry on oeis.org

1, 3, 4, 6, 13, 7, 9, 18, 10, 12, 28, 15, 25, 63, 16, 19, 33, 39, 21, 43, 22, 24, 88, 27, 61, 48, 30, 46, 58, 31, 34, 138, 60, 36, 73, 37, 40, 123, 72, 42, 313, 45, 67, 78, 49, 94, 93, 81, 51, 163, 52, 54, 193, 55, 57, 103, 64, 102, 213, 105, 85, 108, 172, 66, 118, 69, 127, 438, 70, 75, 133, 111, 109, 303
Offset: 1

Views

Author

Antti Karttunen, Jan 24 2015

Keywords

Comments

Shift the prime factorization of odd numbers one step towards larger primes, add one and divide by two.

Examples

			For n = 8, the eighth odd number is 2*8 - 1 = 15 = 3*5 = prime(2) * prime(3). By adding one to both prime indices, we get prime(3) * prime(4) = 5*7 = 35, and (35+1)/2 = 18, thus a(8) = 18. Here prime(n) = A000040(n).
		

Crossrefs

Cf. A032766 (omitting the initial 0, the same sequence sorted into ascending order).
Also a permutation of A253888.

Formula

a(n) = A048673(2*n-1) = (1+A003961(2*n-1)) / 2 = (1+A249735(n)) / 2.
a(n) = A032766(A249746(n)).

A243066 Permutation of natural numbers, the even bisection of A241909 incremented by one and halved; equally, a composition of A241909 and A048673: a(n) = A048673(A241909(n)).

Original entry on oeis.org

1, 2, 5, 3, 14, 13, 41, 4, 8, 63, 122, 25, 365, 313, 38, 6, 1094, 18, 3281, 172, 188, 1563, 9842, 61, 23, 7813, 11, 1201, 29525, 123, 88574, 7, 938, 39063, 113, 39, 265721, 195313, 4688, 666, 797162, 858, 2391485, 8404, 74, 976563, 7174454, 85, 68, 88, 23438, 58825, 21523361, 28
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2014

Keywords

Comments

For n > 1, 2n is found in A241909 from the position (2*a(n))-1. I.e., A241909((2*a(n))-1) = 2n for all n >= 2.
Or in other words, a(n) gives the position in the odd bisection of A241909 where 2n is located at.
Are there any other fixed points than 1, 2, 18 and 72?

Crossrefs

Formula

a(1) = 1, a(n) = (A241909(2*n)+1)/2.
As a composition of related permutations:
a(n) = A048673(A241909(n)).
a(n) = A241909(A243062(A241909(n))).
For all n>=1, a(2^n) = A006254(n).

A291759 Binary encoding of 2-digits in ternary representation of A048673(n).

Original entry on oeis.org

0, 1, 0, 1, 0, 3, 2, 1, 0, 1, 2, 5, 0, 3, 4, 1, 0, 1, 0, 1, 0, 5, 2, 9, 6, 7, 8, 5, 2, 7, 4, 1, 2, 1, 0, 1, 4, 3, 2, 1, 4, 1, 6, 9, 2, 3, 0, 17, 10, 13, 4, 13, 0, 23, 4, 9, 8, 5, 0, 13, 2, 9, 8, 1, 10, 3, 0, 1, 12, 3, 0, 1, 0, 11, 2, 5, 12, 5, 2, 1, 10, 9, 4, 1, 8, 11, 14, 17, 4, 5, 0, 5, 0, 15, 0, 33, 6, 21, 16, 25, 6, 11, 8, 25, 16, 3, 8, 45, 8, 9, 4, 17, 8
Offset: 1

Views

Author

Antti Karttunen, Sep 12 2017

Keywords

Crossrefs

Formula

a(n) = A289814(A048673(n)).

A243506 Permutation of natural numbers: a(n) = A048673(A122111(n)).

Original entry on oeis.org

1, 2, 5, 3, 14, 8, 41, 4, 13, 23, 122, 11, 365, 68, 38, 6, 1094, 18, 3281, 32, 113, 203, 9842, 17, 63, 608, 25, 95, 29525, 53, 88574, 7, 338, 1823, 188, 28, 265721, 5468, 1013, 50, 797162, 158, 2391485, 284, 74, 16403, 7174454, 20, 313, 88, 3038, 851, 21523361, 39, 563, 149, 9113, 49208, 64570082, 83, 193710245, 147623, 221, 9
Offset: 1

Views

Author

Antti Karttunen, Jun 25 2014

Keywords

Crossrefs

Inverse: A243505.
Related or similar permutations: A048673, A122111, A243065-A243066, A244981-A244982, A244983-A244984, A244153-A244154.

Programs

Formula

a(n) = A048673(A122111(n)).
a(n) = A243066(A241916(n)).
For all n >= 1, a(A000040(n)) = A007051(n) and a(A000079(n)) = A006254(n).

A292251 The 3-adic valuation of A048673(n).

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 4, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0
Offset: 1

Views

Author

Antti Karttunen, Sep 12 2017

Keywords

Crossrefs

One less than the even bisection of A292252.
Cf. also A292241, A292261.

Programs

  • Mathematica
    IntegerExponent[#, 3] & /@ Table[(Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ n, {n, 120}] (* Michael De Vlieger, Sep 12 2017 *)

Formula

a(n) = A007814(1+A292250(n)).
a(n) = A007949(A048673(n)).
a(n) = A007949(3*A048673(n)) - 1.
a(n) = A292252(2n)-1.

A336840 Inverse Möbius transform of A048673.

Original entry on oeis.org

1, 3, 4, 8, 5, 14, 7, 22, 17, 18, 8, 42, 10, 26, 26, 63, 11, 65, 13, 55, 38, 30, 16, 124, 30, 38, 80, 81, 17, 100, 20, 185, 44, 42, 50, 206, 22, 50, 56, 164, 23, 148, 25, 94, 127, 62, 28, 368, 68, 117, 62, 120, 31, 316, 58, 244, 74, 66, 32, 318, 35, 78, 189, 550, 74, 172, 37, 133, 92, 196, 38, 626, 41, 86, 174, 159
Offset: 1

Views

Author

Antti Karttunen, Aug 07 2020

Keywords

Comments

Arithmetic mean of the number of divisors (A000005) and prime-shifted sigma (A003973), thus a(n) is the average between the number of and the sum of divisors of A003961(n).
The local minima occur on primes p, where p/2 < a(p) <= (p+1).

Crossrefs

Programs

  • PARI
    A048673(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (factorback(f)+1)/2; };
    A336840(n) = sumdiv(n,d,A048673(d));
    
  • PARI
    A336840(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (1/2)*(numdiv(n)+sigma(factorback(f))); };

Formula

a(n) = Sum_{d|n} A048673(d).
a(n) = (1/2) * (A000005(n) + A003973(n)).
a(n) = A113415(A003961(n)). - Antti Karttunen, Jun 01 2022
a(n) = A349371(A003961(n)) = A364063(A048673(n)). - Antti Karttunen, Nov 30 2024
Showing 1-10 of 195 results. Next