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

A064989 Multiplicative with a(2^e) = 1 and a(p^e) = prevprime(p)^e for odd primes p.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 5, 1, 4, 3, 7, 2, 11, 5, 6, 1, 13, 4, 17, 3, 10, 7, 19, 2, 9, 11, 8, 5, 23, 6, 29, 1, 14, 13, 15, 4, 31, 17, 22, 3, 37, 10, 41, 7, 12, 19, 43, 2, 25, 9, 26, 11, 47, 8, 21, 5, 34, 23, 53, 6, 59, 29, 20, 1, 33, 14, 61, 13, 38, 15, 67, 4, 71, 31, 18, 17, 35, 22, 73, 3, 16
Offset: 1

Views

Author

Vladeta Jovovic, Oct 30 2001

Keywords

Comments

From Antti Karttunen, May 12 2014: (Start)
a(A003961(n)) = n for all n. [This is a left inverse function for the injection A003961.]
Bisections are A064216 (the terms at odd indices) and A064989 itself (the terms at even indices), i.e., a(2n) = a(n) for all n.
(End)
From Antti Karttunen, Dec 18-21 2014: (Start)
When n represents an unordered integer partition via the indices of primes present in its prime factorization (for n >= 2, n corresponds to the partition given as the n-th row of A112798) this operation subtracts one from each part. If n is of the form 2^k (a partition having just k 1's as its parts) the result is an empty partition (which is encoded by 1, having an "empty" factorization).
For all odd numbers n >= 3, a(n) tells which number is located immediately above n in square array A246278. Cf. also A246277.
(End)
Alternatively, if numbers are represented as the multiset of indices of prime factors with multiplicity, this operation subtracts 1 from each element and discards the 0's. - M. F. Hasler, Dec 29 2014

Examples

			a(20) = a(2^2*5) = a(2^2)*a(5) = prevprime(5) = 3.
		

Crossrefs

Cf. A064216 (odd bisection), A003961 (inverse), A151799.
Other sequences whose definition involve or are some other way related with this sequence: A105560, A108951, A118306, A122111, A156552, A163511, A200746, A241909, A243070, A243071, A243072, A243073, A244319, A245605, A245607, A246165, A246266, A246268, A246277, A246278, A246361, A246362, A246371, A246372, A246373, A246374, A246376, A246380, A246675, A246682, A249745, A250470.
Similar prime-shifts towards smaller numbers: A252461, A252462, A252463.

Programs

  • Haskell
    a064989 1 = 1
    a064989 n = product $ map (a008578 . a049084) $ a027746_row n
    -- Reinhard Zumkeller, Apr 09 2012
    (MIT/GNU Scheme, with Aubrey Jaffer's SLIB Scheme library)
    (require 'factor)
    (define (A064989 n) (if (= 1 n) n (apply * (map (lambda (k) (if (zero? k) 1 (A000040 k))) (map -1+ (map A049084 (factor n)))))))
    ;; Antti Karttunen, May 12 2014
    (definec (A064989 n) (if (= 1 n) n (* (A008578 (A055396 n)) (A064989 (A032742 n))))) ;; One based on given recurrence and utilizing memoizing definec-macro.
    (definec (A064989 n) (cond ((= 1 n) n) ((even? n) (A064989 (/ n 2))) (else (A163511 (/ (- (A243071 n) 1) 2))))) ;; Corresponds to one of the alternative formulas, but is very unpractical way to compute this sequence. - Antti Karttunen, Dec 18 2014
    
  • Maple
    q:= proc(p) prevprime(p) end proc: q(2):= 1:
    [seq(mul(q(f[1])^f[2], f = ifactors(n)[2]), n = 1 .. 1000)]; # Robert Israel, Dec 21 2014
  • Mathematica
    Table[Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n, {n, 81}] (* Michael De Vlieger, Jan 04 2016 *)
  • PARI
    { for (n=1, 1000, f=factor(n)~; a=1; j=1; if (n>1 && f[1, 1]==2, j=2); for (i=j, length(f), a*=precprime(f[1, i] - 1)^f[2, i]); write("b064989.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 02 2009
    
  • PARI
    a(n) = {my(f = factor(n)); for (i=1, #f~, if ((p=f[i,1]) % 2, f[i,1] = precprime(p-1), f[i,1] = 1);); factorback(f);} \\ Michel Marcus, Dec 18 2014
    
  • PARI
    A064989(n)=factorback(Mat(apply(t->[max(precprime(t[1]-1),1),t[2]],Vec(factor(n)~))~)) \\ M. F. Hasler, Dec 29 2014
    
  • Python
    from sympy import factorint, prevprime
    from operator import mul
    from functools import reduce
    def a(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==2 else prevprime(i)**f[i] for i in f])
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 15 2017
    
  • Python
    from math import prod
    from sympy import prevprime, factorint
    def A064989(n): return prod(prevprime(p)**e for p, e in  factorint(n>>(~n&n-1).bit_length()).items()) # Chai Wah Wu, Jan 05 2023

Formula

From Antti Karttunen, Dec 18 2014: (Start)
If n = product A000040(k)^e(k) then a(n) = product A008578(k)^e(k) [where A000040(n) gives the n-th prime, and A008578(n) gives 1 for 1 and otherwise the (n-1)-th prime].
a(1) = 1; for n > 1, a(n) = A008578(A055396(n)) * a(A032742(n)). [Above formula represented as a recurrence. Cf. A252461.]
a(1) = 1; for n > 1, a(n) = A008578(A061395(n)) * a(A052126(n)). [Compare to the formula of A252462.]
This prime-shift operation is used in the definitions of many other sequences, thus it can be expressed in many alternative ways:
a(n) = A200746(n) / n.
a(n) = A242424(n) / A105560(n).
a(n) = A122111(A122111(n)/A105560(n)) = A122111(A052126(A122111(n))). [In A112798-partition context: conjugate, remove the largest part (the largest prime factor), and conjugate again.]
a(1) = 1; for n > 1, a(2n) = a(n), a(2n+1) = A163511((A243071(2n+1)-1) / 2).
a(n) = A249818(A250470(A249817(n))). [A250470 is an analogous operation for "going one step up" in the square array A083221 (A083140).]
(End)
Product_{k=1..n} a(k) = n! / A307035(n). - Vaclav Kotesovec, Mar 21 2019
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} ((p^2-p)/(p^2-q(p))) = 0.220703928... , where q(p) = prevprime(p) (A151799) if p > 2 and q(2) = 1. - Amiram Eldar, Nov 18 2022

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

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

A246371 Numbers n such that, if 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

5, 8, 11, 13, 14, 17, 18, 23, 28, 32, 38, 39, 41, 43, 50, 53, 58, 59, 61, 63, 68, 73, 74, 77, 83, 86, 88, 94, 95, 98, 104, 113, 116, 122, 123, 128, 131, 137, 138, 140, 143, 149, 158, 163, 167, 172, 173, 176, 179, 182, 185, 188, 193, 194, 200, 203, 212, 213, 215, 218, 221, 228, 230, 233, 238, 239, 242, 248, 254, 257
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.
Note: This sequence has remarkable but possibly merely coincidental overlap with A053726. On Dec 22 2014, Matthijs Coster mistakenly attached a comment intended for that sequence to this one. On Apr 17 2015, Antti Karttunen noted the error. I have moved the comment to the correct sequence, and have removed Karttunen's note. - Allan C. Wechsler, Aug 01 2022

Crossrefs

Complement: A246372.
Setwise difference of A246361 and A048674.
Subsequence of A104275 and A053726 (20 is the first term > 1 which is not in this sequence).
Subsequence: A246374 (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);
    isA246371(n) = (A064216(n) < n);
    n = 0; i = 0; while(i < 10000, n++; if(isA246371(n), i++; write("b246371.txt", i, " ", n)));
    (Scheme, with Antti Karttunen's IntSeq-library)
    (define A246371 (MATCHING-POS 1 1 (lambda (n) (< (A064216 n) n))))

A246352 Numbers n such that A048673(n) >= n.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 26, 27, 28, 30, 32, 33, 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, 93, 96, 98, 99, 100, 102, 104, 105, 108, 110, 112, 114, 116, 117, 120, 124, 125, 126, 128, 130, 132
Offset: 1

Views

Author

Antti Karttunen, Aug 24 2014

Keywords

Crossrefs

Complement: A246351
Union of A246282 and A048674.
Subsequence: A029744 (gives the positions of records in A048673).
Cf. A246372.

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;
    isA246352(n) = (A048673(n) >= n);
    n = 0; i = 0; while(i < 10000, n++; if(isA246352(n), i++; write("b246352.txt", i, " ", n)));
    (Scheme, with Antti Karttunen's IntSeq-library)
    (define A246352 (MATCHING-POS 1 1 (lambda (n) (>= (A048673 n) n))))

A246362 Numbers n such that if 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

4, 6, 7, 9, 10, 12, 15, 16, 19, 20, 21, 22, 24, 27, 29, 30, 31, 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, 96, 97, 99, 100, 101, 102, 103, 105, 106, 107, 108, 109, 110, 111, 112, 114, 115
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.
The sequence grows as:
a(100) = 148
a(1000) = 1449
a(10000) = 14264
a(100000) = 141259
a(1000000) = 1418197
and the powers of 10 occur at:
a(5) = 10
a(63) = 100
a(701) = 1000
a(6973) = 10000
a(70845) = 100000
a(705313) = 1000000
suggesting that the ratio a(n)/n is converging to a constant and an arbitrary natural number is more than twice as likely to be here than in the complement A246361. Compare this to the ratio present in the "inverse" case A246282.

Examples

			4 is present, as 2*4 - 1 = 7 = p_4, and p_{4-1} = p_3 = 5 > 4.
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.
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: A246361.
Setwise difference of A246372 and A048674.

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);
    isA246362(n) = (A064216(n) > n);
    n = 0; i = 0; while(i < 10000, n++; if(isA246362(n), i++; write("b246362.txt", i, " ", n)));
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A246362 (MATCHING-POS 1 1 (lambda (n) (> (A064216 n) n))))

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)))))

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)).
Showing 1-10 of 11 results. Next