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 10 results.

A048673 Permutation of natural numbers: a(n) = (A003961(n)+1) / 2 [where A003961(n) shifts the prime factorization of n one step towards larger primes].

Original entry on oeis.org

1, 2, 3, 5, 4, 8, 6, 14, 13, 11, 7, 23, 9, 17, 18, 41, 10, 38, 12, 32, 28, 20, 15, 68, 25, 26, 63, 50, 16, 53, 19, 122, 33, 29, 39, 113, 21, 35, 43, 95, 22, 83, 24, 59, 88, 44, 27, 203, 61, 74, 48, 77, 30, 188, 46, 149, 58, 47, 31, 158, 34, 56, 138, 365, 60, 98, 36, 86, 73
Offset: 1

Views

Author

Antti Karttunen, Jul 14 1999

Keywords

Comments

Inverse of sequence A064216 considered as a permutation of the positive integers. - Howard A. Landman, Sep 25 2001
From Antti Karttunen, Dec 20 2014: (Start)
Permutation of natural numbers obtained by replacing each prime divisor of n with the next prime and mapping the generated odd numbers back to all natural numbers by adding one and then halving.
Note: there is a 7-cycle almost right in the beginning: (6 8 14 17 10 11 7). (See also comments at A249821. This 7-cycle is endlessly copied in permutations like A250249/A250250.)
The only 3-cycle in range 1 .. 402653184 is (2821 3460 5639).
For 1- and 2-cycles, see A245449.
(End)
The first 5-cycle is (1410, 2783, 2451, 2703, 2803). - Robert Israel, Jan 15 2015
From Michel Marcus, Aug 09 2020: (Start)
(5194, 5356, 6149, 8186, 10709), (46048, 51339, 87915, 102673, 137205) and (175811, 200924, 226175, 246397, 267838) are other 5-cycles.
(10242, 20479, 21413, 29245, 30275, 40354, 48241) is another 7-cycle. (End)
From Antti Karttunen, Feb 10 2021: (Start)
Somewhat artificially, also this permutation can be represented as a binary tree. Each child to the left is obtained by multiplying the parent by 3 and subtracting one, while each child to the right is obtained by applying A253888 to the parent:
1
|
................../ \..................
2 3
5......../ \........4 8......../ \........6
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
14 13 11 7 23 9 17 18
41 10 38 12 32 28 20 15 68 25 26 63 50 16 53 19
etc.
Each node's (> 1) parent can be obtained with A253889. Sequences A292243, A292244, A292245 and A292246 are constructed from the residues (mod 3) of the vertices encountered on the path from n to the root (1).
(End)

Examples

			For n = 6, as 6 = 2 * 3 = prime(1) * prime(2), we have a(6) = ((prime(1+1) * prime(2+1))+1) / 2 = ((3 * 5)+1)/2 = 8.
For n = 12, as 12 = 2^2 * 3, we have a(12) = ((3^2 * 5) + 1)/2 = 23.
		

Crossrefs

Inverse: A064216.
Row 1 of A251722, Row 2 of A249822.
One more than A108228, half the terms of A243501.
Fixed points: A048674.
Positions of records: A029744, their values: A246360 (= A007051 interleaved with A057198).
Positions of subrecords: A247283, their values: A247284.
Cf. A246351 (Numbers n such that a(n) < n.)
Cf. A246352 (Numbers n such that a(n) >= n.)
Cf. A246281 (Numbers n such that a(n) <= n.)
Cf. A246282 (Numbers n such that a(n) > n.), A252742 (their char. function)
Cf. A246261 (Numbers n for which a(n) is odd.)
Cf. A246263 (Numbers n for which a(n) is even.)
Cf. A246260 (a(n) reduced modulo 2), A341345 (modulo 3), A341346, A292251 (3-adic valuation), A292252.
Cf. A246342 (Iterates starting from n=12.)
Cf. A246344 (Iterates starting from n=16.)
Cf. A245447 (This permutation "squared", a(a(n)).)
Other permutations whose formulas refer to this sequence: A122111, A243062, A243066, A243500, A243506, A244154, A244319, A245605, A245608, A245610, A245612, A245708, A246265, A246267, A246268, A246363, A249745, A249824, A249826, and also A183209, A254103 that are somewhat similar.
Cf. also prime-shift based binary trees A005940, A163511, A245612 and A244154.
Cf. A253888, A253889, A292243, A292244, A292245 and A292246 for other derived sequences.
Cf. A323893 (Dirichlet inverse), A323894 (sum with it), A336840 (inverse Möbius transform).

Programs

  • Haskell
    a048673 = (`div` 2) . (+ 1) . a045965
    -- Reinhard Zumkeller, Jul 12 2012
    
  • Maple
    f:= proc(n)
    local F,q,t;
      F:= ifactors(n)[2];
      (1 + mul(nextprime(t[1])^t[2], t = F))/2
    end proc:
    seq(f(n),n=1..1000); # Robert Israel, Jan 15 2015
  • Mathematica
    Table[(Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ n, {n, 69}] (* Michael De Vlieger, Dec 18 2014, revised Mar 17 2016 *)
  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A048673(n) = (A003961(n)+1)/2; \\ Antti Karttunen, Dec 20 2014
    
  • PARI
    A048673(n) = if(1==n,n,if(n%2,A253888(A048673((n-1)/2)),(3*A048673(n/2))-1)); \\ (Not practical, but demonstrates the construction as a binary tree). - Antti Karttunen, Feb 10 2021
    
  • Python
    from sympy import factorint, nextprime, prod
    def a(n):
        f = factorint(n)
        return 1 if n==1 else (1 + prod(nextprime(i)**f[i] for i in f))//2 # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A048673 n) (/ (+ 1 (A003961 n)) 2)) ;; Antti Karttunen, Dec 20 2014
    

Formula

From Antti Karttunen, Dec 20 2014: (Start)
a(1) = 1; for n>1: If n = product_{k>=1} (p_k)^(c_k), then a(n) = (1/2) * (1 + product_{k>=1} (p_{k+1})^(c_k)).
a(n) = (A003961(n)+1) / 2.
a(n) = floor((A045965(n)+1)/2).
Other identities. For all n >= 1:
a(n) = A108228(n)+1.
a(n) = A243501(n)/2.
A108951(n) = A181812(a(n)).
a(A246263(A246268(n))) = 2*n.
As a composition of other permutations involving prime-shift operations:
a(n) = A243506(A122111(n)).
a(n) = A243066(A241909(n)).
a(n) = A241909(A243062(n)).
a(n) = A244154(A156552(n)).
a(n) = A245610(A244319(n)).
a(n) = A227413(A246363(n)).
a(n) = A245612(A243071(n)).
a(n) = A245608(A245605(n)).
a(n) = A245610(A244319(n)).
a(n) = A249745(A249824(n)).
For n >= 2, a(n) = A245708(1+A245605(n-1)).
(End)
From Antti Karttunen, Jan 17 2015: (Start)
We also have the following identities:
a(2n) = 3*a(n) - 1. [Thus a(2n+1) = 0 or 1 when reduced modulo 3. See A341346]
a(3n) = 5*a(n) - 2.
a(4n) = 9*a(n) - 4.
a(5n) = 7*a(n) - 3.
a(6n) = 15*a(n) - 7.
a(7n) = 11*a(n) - 5.
a(8n) = 27*a(n) - 13.
a(9n) = 25*a(n) - 12.
and in general:
a(x*y) = (A003961(x) * a(y)) - a(x) + 1, for all x, y >= 1.
(End)
From Antti Karttunen, Feb 10 2021: (Start)
For n > 1, a(2n) = A016789(a(n)-1), a(2n+1) = A253888(a(n)).
a(2^n) = A007051(n) for all n >= 0. [A property shared with A183209 and A254103].
(End)
a(n) = A003602(A003961(n)). - Antti Karttunen, Apr 20 2022
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/4) * Product_{p prime} ((p^2-p)/(p^2-nextprime(p))) = 1.0319981... , where nextprime is A151800. - Amiram Eldar, Jan 18 2023

Extensions

New name and crossrefs to derived sequences added by Antti Karttunen, Dec 20 2014

A246282 Numbers k for which A003961(k) > 2*k; numbers n such that if n = Product_{k >= 1} (p_k)^(c_k), then Product_{k >= 1} (p_{k+1})^(c_k) > 2*n, where p_k indicates the k-th prime, A000040(k).

Original entry on oeis.org

4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 27, 28, 30, 32, 35, 36, 39, 40, 42, 44, 45, 48, 49, 50, 52, 54, 56, 57, 60, 63, 64, 66, 68, 69, 70, 72, 75, 76, 78, 80, 81, 84, 88, 90, 91, 92, 96, 98, 99, 100, 102, 104, 105, 108, 110, 112, 114, 116, 117, 120, 124, 125, 126, 128, 130, 132, 135, 136, 138, 140, 144
Offset: 1

Views

Author

Antti Karttunen, Aug 24 2014

Keywords

Comments

Numbers n such that A003961(n) > 2*n.
Numbers n such that A048673(n) > n.
The sequence grows as:
a(10) = 18
a(100) = 192
a(1000) = 1830
a(10000) = 18636
a(100000) = 187350
a(1000000) = 1865226
a(10000000) = 18654333
and the powers of 10 occur at:
a(5) = 10
a(53) = 100
a(536) = 1000
a(5423) = 10000
a(53290) = 100000
a(535797) = 1000000
a(5361886) = 10000000
suggesting that the ratio a(n)/n is converging to an constant and an arbitrary natural number is slightly more likely to be in this sequence than in the complement A246281. See also comments at A246351 and compare to quite a different ratio present in the "inverse" case A246362.
From Antti Karttunen, Aug 27 2020: (Start)
Any perfect number, including all odd perfect numbers (if such numbers exist), must occur in this sequence. See A286385 and A326042 for the reason why.
Like abundancy index (ratio A000203(n)/n), also ratio A003961(n)/n is multiplicative and always > 1 for all n > 1. Thus if the number has a proper divisor that is in this sequence, then the number itself also is. See A337372 for terms included here, but with no proper divisor in this sequence. (End)
For k >= 2, if m * A130789(k) is a term then m * A130789(k-1) is a term. - Peter Munn, Sep 01 2025
Could be called "primeshift-abundant numbers", in analogy with A005101. - Antti Karttunen, Sep 01 2025

Examples

			3 = p_2 (3 is the second prime, A000040(2)) is not a member, because p_3 = 5 (5 is the next prime after 3, A000040(3)) and 5/3 < 2.
4 = 2*2 = p_1 * p_1 is a member, as p_2 * p_2 = 3*3 = 9, and 9/4 > 2.
33 = 3*11 = p_2 * p_5 is not a member, as p_3 * p_6 = 5*13 = 65, and 65/33 < 2.
35 = 5*7 = p_3 * p_4 is a member, as p_4 * p_5 = 7*11 = 77, and 77/35 > 2.
		

Crossrefs

Complement: A246281.
Setwise difference of A246352 and A048674.
Cf. A000040, A003961, A048673, A130789, A246362, A252742 (characteristic function), A286385, A326042, A337345.
Positions of positive terms in A252748 and in A337345.
Union of A337372 (primitive terms), A341610 (non-primitive terms).
Cf. also A275717, A275718.

Programs

  • Mathematica
    Select[Range[144], 2 # < Times @@ Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e > 0 :> {Prime[PrimePi@ p + 1], e}] - Boole[# == 1] &] (* Michael De Vlieger, Feb 22 2021 *)
  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); }; \\ From A003961
    isA246282(n) = (A003961(n) > (n+n));
    n = 0; i = 0; while(i < 10000, n++; if(isA246282(n), i++; write("b246282.txt", i, " ", n)));
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A246282 (MATCHING-POS 1 1 (lambda (n) (> (A003961 n) (* 2 n)))))
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A246282 (MATCHING-POS 1 1 (lambda (n) (> (A048673 n) n))))

Extensions

A new shorter version of name prepended by Antti Karttunen, Aug 27 2020

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

A246351 Numbers k such that A048673(k) < k.

Original entry on oeis.org

5, 7, 11, 13, 17, 19, 22, 23, 29, 31, 34, 37, 38, 41, 43, 46, 47, 51, 53, 55, 58, 59, 61, 62, 65, 67, 71, 73, 74, 77, 79, 82, 83, 85, 86, 87, 89, 94, 95, 97, 101, 103, 106, 107, 109, 111, 113, 115, 118, 119, 121, 122, 123, 127, 129, 131, 133, 134, 137, 139, 141, 142, 143, 145, 146, 149, 151, 155, 157, 158, 159
Offset: 1

Views

Author

Antti Karttunen, Aug 24 2014

Keywords

Comments

The growth rate of the sequence seems to converge:
a(100) = 217
a(1000) = 2231
a(10000) = 21535
a(100000) = 214647
a(1000000) = 2155903
a(10000000) = 21553153
Please see comments in A246282.

Crossrefs

Complement: A246352.
Setwise difference of A246281 and A048674.

Programs

  • PARI
    default(primelimit, 2^22);
    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;
    isA246351(n) = (A048673(n) < n);
    n = 0; i = 0; while(i < 10000, n++; if(isA246351(n), i++; write("b246351.txt", i, " ", n)));
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A246351 (MATCHING-POS 1 1 (lambda (n) (< (A048673 n) n))))

A246372 Numbers n such that 2n-1 = product_{k >= 1} (p_k)^(c_k), then n <= product_{k >= 1} (p_{k-1})^(c_k), where p_k indicates the k-th prime, A000040(k).

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 9, 10, 12, 15, 16, 19, 20, 21, 22, 24, 25, 26, 27, 29, 30, 31, 33, 34, 35, 36, 37, 40, 42, 44, 45, 46, 47, 48, 49, 51, 52, 54, 55, 56, 57, 60, 62, 64, 65, 66, 67, 69, 70, 71, 72, 75, 76, 78, 79, 80, 81, 82, 84, 85, 87, 89, 90, 91, 92, 93, 96, 97, 99, 100, 101, 102, 103, 105, 106, 107, 108, 109, 110
Offset: 1

Views

Author

Antti Karttunen, Aug 24 2014

Keywords

Comments

Numbers n such that A064216(n) >= n.
Numbers n such that A064989(2n-1) >= n.

Examples

			1 is present, as 2*1 - 1 = empty product = 1.
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.
6 is present, as 2*6 - 1 = 11 = p_5, and p_{5-1} = p_4 = 7 >= 6.
25 is present, as 2*25 - 1 = 49 = p_4^2, and p_3^2 = 5*5 = 25 >= 25.
35 is present, as 2*35 - 1 = 69 = 3*23 = p_2 * p_9, and p_1 * p_8 = 2*19 = 38 >= 35.
		

Crossrefs

Complement: A246371
Union of A246362 and A048674.
Subsequences: A006254 (A111333), A246373 (the primes present in this sequence).

Programs

  • PARI
    default(primelimit, 2^30);
    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);
    isA246372(n) = (A064216(n) >= n);
    n = 0; i = 0; while(i < 10000, n++; if(isA246372(n), i++; write("b246372.txt", i, " ", n)));
    (Scheme, with Antti Karttunen's IntSeq-library)
    (define A246372 (MATCHING-POS 1 1 (lambda (n) (>= (A064216 n) n))))

A246342 a(0) = 12, after which, if a(n-1) = product_{k >= 1} (p_k)^(c_k), then a(n) = (1/2) * (1 + product_{k >= 1} (p_{k+1})^(c_k)), where p_k indicates the k-th prime, A000040(k).

Original entry on oeis.org

12, 23, 15, 18, 38, 35, 39, 43, 24, 68, 86, 71, 37, 21, 28, 50, 74, 62, 56, 149, 76, 104, 230, 305, 235, 186, 278, 224, 1337, 1062, 2288, 8951, 4482, 16688, 67271, 33637, 16821, 66688, 571901, 338059, 181516, 258260, 455900, 1180337, 1080207, 1817863, 1157487, 984558, 1230848, 53764115
Offset: 0

Views

Author

Antti Karttunen, Aug 24 2014

Keywords

Comments

Iterates of A048673 starting from value 12.
All numbers 1 .. 11 are in finite cycles of A048673/A064216, thus 12 is the smallest number in this cycle, regardless of whether the cycle is infinite or finite.
This sequence soon reaches much larger values than the corresponding A246343 (iterating the same cycle in the other direction). However, with the corresponding sequences starting from 16 (A246344 & A246345), there is no such pronounced difference, and with them the bias is actually the other way.

Examples

			Start with a(0) = 12; thereafter each new term is obtained by replacing each prime factor of the previous term with the next prime, to whose product 1 is added before it is halved:
12 = 2^2 * 3 = p_1^2 * p_2 -> ((p_2^2 * p_3)+1)/2 = ((9*5)+1)/2 = 23, thus a(1) = 23.
23 = p_9 -> (p_10 + 1)/2 = (29+1)/2 = 15, thus a(2) = 15.
		

Crossrefs

A246343 gives the terms of the same cycle when going in the opposite direction from 12.

Programs

  • PARI
    default(primelimit, 2^30);
    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
    A048673(n) = (A003961(n)+1)/2;
    k = 12; for(n=0, 1001, write("b246342.txt", n, " ", k) ; k = A048673(k));
    (Scheme, with memoization-macro definec)
    (definec (A246342 n) (if (zero? n) 12 (A048673 (A246342 (- n 1)))))

Formula

a(0) = 12, and for n >= 1, a(n) = A048673(a(n-1)).

A246343 a(0) = 12, after which, if (2*a(n-1)) - 1 = product_{k >= 1} (p_k)^(c_k) then a(n) = product_{k >= 1} (p_{k-1})^(c_k), where p_k indicates the k-th prime, A000040(k).

Original entry on oeis.org

12, 19, 31, 59, 44, 46, 55, 107, 134, 166, 317, 398, 282, 557, 470, 622, 763, 531, 1051, 1267, 1807, 3607, 7211, 4522, 9041, 3700, 3725, 3982, 7951, 15889, 30053, 24018, 24189, 34535, 14630, 12916, 21769, 27599, 24524, 32678, 26094, 43073, 34446, 68881, 116479, 143359, 275221, 550439, 667462, 1051489
Offset: 0

Views

Author

Antti Karttunen, Aug 24 2014

Keywords

Comments

Iterates of A064216 starting from value 12.
All numbers from 1 to 11 are in finite cycles of A048673/A064216, thus 12 is the smallest number in this cycle, regardless of whether it is infinite or finite.

Examples

			Start with a(0) = 12; then after each new term is obtained by doubling the previous term, from which one is subtracted, after which each prime factor is replaced with the previous prime:
12 -> ((2*12)-1) = 23 = p_9, and p_8 = 19, thus a(1) = 19.
19 -> ((2*19)-1) = 37 = p_12, and p_11 = 31, thus a(2) = 31.
31 -> ((2*31)-1) = 61 = p_18, and p_17 = 59, thus a(3) = 59.
59 -> ((2*59)-1) = 117 = 3*3*13 = p_2 * p_2 * p_6, and p_1 * p_1 * p_5 = 2*2*11 = 44, thus a(4) = 44.
		

Crossrefs

A246342 gives the terms of the same cycle when going to the opposite direction from 12.

Programs

  • PARI
    default(primelimit, 2^30);
    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);
    k = 12; for(n=0, 1001, write("b246343.txt", n, " ", k); k = A064216(k));
    (Scheme, with memoization-macro definec)
    (definec (A246343 n) (if (zero? n) 12 (A064216 (A246343 (- n 1)))))

Formula

a(0) = 12, a(n) = A064216(a(n-1)).

A246344 a(0) = 16, after which, if a(n-1) = product_{k >= 1} (p_k)^(c_k), then a(n) = (1/2) * (1 + product_{k >= 1} (p_{k+1})^(c_k)), where p_k indicates the k-th prime, A000040(k).

Original entry on oeis.org

16, 41, 22, 20, 32, 122, 101, 52, 77, 72, 338, 434, 611, 451, 280, 1040, 4820, 7907, 3960, 30713, 15364, 22577, 12154, 9791, 4902, 8108, 9131, 5815, 4099, 2056, 3551, 2095, 1474, 1385, 984, 2903, 1455, 1768, 4361, 5869, 2940, 19058, 18845, 13227, 11053, 8707, 4357, 2182, 1640, 4064, 15917, 9432, 46238
Offset: 0

Views

Author

Antti Karttunen, Aug 24 2014

Keywords

Comments

Iterates of A048673 starting from value 16.
Either this sequence is actually part of the cycle containing 12 (see A246342) or 16 is the smallest member of this cycle (regardless of whether this cycle is finite or infinite), which follows because all numbers 1 .. 11 are in finite cycles, and also 13 and 14 are in closed cycles and 15 is in the cycle of 12.

Examples

			Start with a(0) = 16; then after each new term is obtained by replacing each prime factor of the previous term with the next prime, to whose product is added one before it is halved:
16 = 2^4 = p_1^4 -> ((p_2^4)+1)/2 = (3^4 + 1)/2 = (81+1)/2 = 41, thus a(1) = 41.
41 = p_13 -> ((p_14)+1)/2 = (43+1)/2 = 22, thus a(2) = 22.
		

Crossrefs

A246345 gives the terms of the same cycle when going to the opposite direction from 16.

Programs

  • PARI
    default(primelimit, 2^30);
    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
    A048673(n) = (A003961(n)+1)/2;
    k = 16; for(n=0, 1001, write("b246344.txt", n, " ", k) ; k = A048673(k));
    (Scheme, with memoization-macro definec)
    (definec (A246344 n) (if (zero? n) 16 (A048673 (A246344 (- n 1)))))

Formula

a(0) = 16, and for n >= 1, a(n) = A048673(a(n-1)).

A246345 a(0) = 16, after which, if (2*a(n-1)) - 1 = product_{k >= 1} (p_k)^(c_k) then a(n) = product_{k >= 1} (p_{k-1})^(c_k), where p_k indicates the k-th prime, A000040(k).

Original entry on oeis.org

16, 29, 34, 61, 49, 89, 106, 199, 389, 310, 617, 524, 694, 1207, 1921, 3097, 3899, 4142, 3374, 3674, 4234, 8461, 16903, 20211, 37841, 22408, 26853, 26391, 48031, 68605, 137201, 81272, 108334, 137809, 266737, 512627, 347932, 497005, 982081, 1942279, 3855031, 5292209
Offset: 0

Views

Author

Antti Karttunen, Aug 24 2014

Keywords

Comments

Iterates of A064216 starting from value 16.
See also the comments in A246344.

Examples

			Start with a(0) = 16; then after each new term is obtained by doubling the previous term, from which one is subtracted, after which each prime factor is replaced with the previous prime:
16 -> ((2*16)-1) = 31 = p_1, and p_10 = 29, thus a(1) = 29.
29 -> ((2*29)-1) = 57 = 3*19 = p_2 * p_8, and p_1 * p_7 = 2*17 = 34, thus a(2) = 34.
		

Crossrefs

A246344 gives the terms of the same cycle when going to the opposite direction from 16.

Programs

  • Mathematica
    nxt[n_]:=Times@@(NextPrime[#,-1]&/@(Flatten[Table[#[[1]],{#[[2]]}]&/@ FactorInteger[2 n-1]])); NestList[nxt,16,50] (* Harvey P. Dale, Apr 04 2015 *)
  • PARI
    default(primelimit, 2^30);
    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);
    k = 16; for(n=0, 1001, write("b246345.txt", n, " ", k); k = A064216(k));
    (Scheme, with memoization-macro definec)
    (definec (A246345 n) (if (zero? n) 16 (A064216 (A246345 (- n 1)))))

Formula

a(0) = 16, a(n) = A064216(a(n-1)).

A349573 a(n) = A048673(n) - n, where A048673(n) = (A003961(n)+1) / 2, and A003961(n) shifts the prime factorization of n one step towards larger primes.

Original entry on oeis.org

0, 0, 0, 1, -1, 2, -1, 6, 4, 1, -4, 11, -4, 3, 3, 25, -7, 20, -7, 12, 7, -2, -8, 44, 0, 0, 36, 22, -13, 23, -12, 90, 0, -5, 4, 77, -16, -3, 4, 55, -19, 41, -19, 15, 43, -2, -20, 155, 12, 24, -3, 25, -23, 134, -9, 93, 1, -11, -28, 98, -27, -6, 75, 301, -5, 32, -31, 18, 4, 46, -34, 266, -33, -12, 48, 28, -5, 50, -37
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2021

Keywords

Crossrefs

Cf. A048674 (positions of zeros), A246351 (negative terms), A246281 (nonpositive terms), A246352 (nonnegative terms), A246282 (positive terms), A269860 (even terms), A269861 (odd terms).

Programs

  • Mathematica
    f[p_, e_] := NextPrime[p]^e; a[1] = 0; a[n_] := (1 + Times @@ f @@@ FactorInteger[n])/2 - n; Array[a, 100] (* Amiram Eldar, Nov 23 2021 *)
  • PARI
    A048673(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (1/2)*(1+factorback(f)); };
    A349573(n) = (A048673(n)-n);

Formula

a(n) = A048673(n) - n.
a(n) = Sum_{d|n, dA349571(n/d).
Showing 1-10 of 10 results.