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

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

A243065 Permutation of natural numbers, the odd bisection of A241909 halved; equally, a composition of A064216 and A241909: a(n) = A241909(A064216(n)).

Original entry on oeis.org

1, 2, 4, 8, 3, 16, 32, 9, 64, 128, 27, 256, 6, 5, 512, 1024, 81, 18, 2048, 243, 4096, 8192, 25, 16384, 12, 729, 32768, 54, 2187, 65536, 131072, 125, 162, 262144, 6561, 524288, 1048576, 15, 36, 2097152, 7, 4194304, 486, 19683, 8388608, 108, 59049, 1458, 16777216, 625, 33554432, 67108864, 75
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2014

Keywords

Comments

Are there any other fixed points than 1, 2, 18 and 72?

Crossrefs

Programs

Formula

a(1) = 1, and for n>=2, a(n) = A241909(2n-1)/2. Equally, a(n) = ceiling(A241909(2n-1)/2) for all n.
As a composition of related permutations:
a(n) = A241909(A064216(n)).
a(n) = A241909(A243061(A241909(n))).
For all n, a(A006254(n)) = 2^n.

A245611 Permutation of natural numbers: a(n) = A243071(A064216(n)).

Original entry on oeis.org

0, 1, 3, 7, 2, 15, 31, 6, 63, 127, 14, 255, 5, 4, 511, 1023, 30, 13, 2047, 62, 4095, 8191, 12, 16383, 11, 126, 32767, 29, 254, 65535, 131071, 28, 61, 262143, 510, 524287, 1048575, 10, 27, 2097151, 8, 4194303, 125, 1022, 8388607, 59, 2046, 253, 16777215, 60, 33554431, 67108863, 26
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2014

Keywords

Comments

Note the indexing: the domain starts from 1, while the range includes also zero.
The odd bisection of A243071 decremented by one and halved. (For a(1) = 0, take ceiling of -1/2).

Crossrefs

Programs

Formula

a(1) = 0, and for n > 1, a(n) = (1/2) * (A243071((2*n)-1) - 1).
As a composition of related permutations:
a(n) = A243071(A064216(n)).
a(n) = A054429(A244153(n)).

A244153 Permutation of natural numbers, the odd bisection of A156552 halved; equally, a composition of A064216 and A156552: a(n) = A156552(A064216(n)).

Original entry on oeis.org

0, 1, 2, 4, 3, 8, 16, 5, 32, 64, 9, 128, 6, 7, 256, 512, 17, 10, 1024, 33, 2048, 4096, 11, 8192, 12, 65, 16384, 18, 129, 32768, 65536, 19, 34, 131072, 257, 262144, 524288, 13, 20, 1048576, 15, 2097152, 66, 513, 4194304, 36, 1025, 130, 8388608, 35, 16777216, 33554432, 21, 67108864, 134217728, 2049, 268435456, 258, 67, 68, 24, 4097, 14
Offset: 1

Views

Author

Antti Karttunen, Jun 27 2014

Keywords

Comments

Note the indexing: the domain starts from 1, while the range includes also zero.

Crossrefs

Programs

Formula

a(n) = A156552(2n+1) / 2.
As a composition of related permutations:
a(n) = A156552(A064216(n)).
a(n) = A054429(A245611(n)).

A249746 Permutation of natural numbers: a(n) = A126760(A249735(n)) = A249824(A064216(n)).

Original entry on oeis.org

1, 2, 3, 4, 9, 5, 6, 12, 7, 8, 19, 10, 17, 42, 11, 13, 22, 26, 14, 29, 15, 16, 59, 18, 41, 32, 20, 31, 39, 21, 23, 92, 40, 24, 49, 25, 27, 82, 48, 28, 209, 30, 45, 52, 33, 63, 62, 54, 34, 109, 35, 36, 129, 37, 38, 69, 43, 68, 142, 70, 57, 72, 115, 44, 79, 46, 85, 292, 47, 50, 89, 74, 73, 202, 51, 53, 159, 87, 55, 99, 107, 56, 152, 58, 97, 192, 60
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2014

Keywords

Comments

Permutation obtained from the odd bisection of A003961 (or from the odd bisection of A048673).

Examples

			a(5) = 9 because of the following. 2*A064216(5) = 2*4 = 8 = 2^3. We replace the prime factor 2 of 8 with the next prime 3 to get 3^3, then replace 3 with 5 to get 5^3 = 125. The smallest prime factor of 125 is 5. 125 is the 9th term of A084967: 5, 25, 35, 55, 65, 85, 95, 115, 125, ..., thus a(5) = 9.
		

Crossrefs

Programs

  • Mathematica
    t = PositionIndex[FactorInteger[#][[1, 1]] & /@ Range[10^6]]; f[n_] := Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n; Flatten@ Map[Position[Lookup[t, FactorInteger[#][[1, 1]] ], #] &[f@ f[2 #]] &, Table[Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1], {n, 87}]] (* Michael De Vlieger, Jul 25 2016, Version 10 *)
  • Scheme
    (define (A249746 n) (define (Ainv_of_A007310off0 n) (+ (* 2 (floor->exact (/ n 6))) (/ (- (modulo n 6) 1) 4))) (+ 1 (Ainv_of_A007310off0 (A003961 (+ n n -1)))))

Formula

a(n) = 1 + f(A003961(2n - 1)), where f(n) = 2*floor[n/6] + ((n mod 6)-1)/4. [Here 1 + f(A007310(n)) = n.]
a(n) = A126760(A249735(n)). - Antti Karttunen, Jul 25 2016
As a composition of related permutations:
a(n) = A249824(A064216(n)).
Other identities. For all n >= 1:
A249735(n) = A007310(a(n)).
a(3n-1) = A273669(a(n)) and a(A254049(n)) = A273664(a(n)). - Antti Karttunen, Aug 07 2016

A285712 a(1) = 0, and for n > 1, if n = 3k-1, then a(n) = k, otherwise a(n) = (A064216(n)+1)/2.

Original entry on oeis.org

0, 1, 2, 3, 2, 4, 6, 3, 7, 9, 4, 10, 5, 5, 12, 15, 6, 8, 16, 7, 19, 21, 8, 22, 13, 9, 24, 11, 10, 27, 30, 11, 17, 31, 12, 34, 36, 13, 18, 37, 14, 40, 20, 15, 42, 28, 16, 26, 45, 17, 49, 51, 18, 52, 54, 19, 55, 29, 20, 33, 25, 21, 14, 57, 22, 64, 43, 23, 66, 69, 24, 39, 35, 25, 70, 75, 26, 44, 76, 27, 48, 79, 28, 82, 61, 29, 84, 23, 30, 87, 90, 31, 47, 46, 32
Offset: 1

Views

Author

Antti Karttunen, Apr 25 2017

Keywords

Comments

For n >= 2, a(n) gives the contents of the parent node of the node containing n in binary trees like A245612.
Every positive integer greater than one occurs exactly twice in this sequence.

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = Which[n == 1, 0, Mod[n, 3] == 2, Ceiling[n/3], True, (Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1] + 1)/2]; Array[a, 95] (* Michael De Vlieger, Sep 22 2017 *)
  • Scheme
    (define (A285712 n) (cond ((<= n 1) (- n 1)) ((= 2 (modulo n 3)) (A002264 (+ 1 n))) (else (/ (+ 1 (A064216 n)) 2))))

Formula

a(1) = 0, and for n > 1, if n = 3*k-1, then a(n) = k, otherwise a(n) = (A064216(n)+1)/2.
a(n) = (n+1)/3 + (3*A064216(n) - 2*n + 1)*( (n+1)^2 mod 3 )/6, for n>1. - Ammar Khatab, Sep 21 2020

A253889 a(n) = A048673(floor(A064216(n)/2)).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 3, 8, 14, 4, 13, 5, 5, 7, 17, 6, 6, 18, 7, 38, 32, 8, 28, 23, 9, 15, 11, 10, 26, 16, 11, 41, 53, 12, 33, 39, 13, 10, 113, 14, 43, 12, 15, 22, 63, 16, 25, 59, 17, 203, 74, 18, 48, 30, 19, 188, 50, 20, 122, 68, 21, 9, 149, 22, 138, 83, 23, 60, 86, 24, 35, 29, 25, 73, 62, 26, 24, 123, 27, 27, 128, 28, 313
Offset: 1

Views

Author

Antti Karttunen, Jan 22 2015

Keywords

Comments

When A048673 is represented as a binary tree, then any non-root node k (>= 2) which contains value n = A048673(k) has as its parent a(n) = A048673(floor(k/2)).

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; Array[Floor@ g[Floor[f[#]/2]] &, 84] (* Michael De Vlieger, Sep 16 2017 *)
  • Scheme
    (define (A253889 n) (A048673 (floor->exact (/ (A064216 n) 2))))

Formula

a(n) = A048673(floor(A064216(n)/2)).
Other identities. For all n >= 0:
a(3n+2) = n+1.

A254053 Square array: A(row,col) = 2^(row-1) * ((2*A249745(col))-1) = A064216(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, 3, 2, 5, 6, 4, 7, 10, 12, 8, 11, 14, 20, 24, 16, 13, 22, 28, 40, 48, 32, 17, 26, 44, 56, 80, 96, 64, 19, 34, 52, 88, 112, 160, 192, 128, 9, 38, 68, 104, 176, 224, 320, 384, 256, 23, 18, 76, 136, 208, 352, 448, 640, 768, 512, 29, 46, 36, 152, 272, 416, 704, 896, 1280, 1536, 1024, 15, 58, 92, 72, 304, 544, 832, 1408, 1792, 2560, 3072, 2048, 31, 30
Offset: 1

Views

Author

Antti Karttunen, Jan 24 2015

Keywords

Comments

Shares with A135764 and A253551 the property that A001511(n) = k for all terms n on row k and when going downward in each column, terms grow by doubling.

Examples

			The top left corner of the array:
   1,  3,  5,   7,  11,  13,  17,  19,   9,  23,  29,  15,  31,  37,  41,  43,
   2,  6, 10,  14,  22,  26,  34,  38,  18,  46,  58,  30,  62,  74,  82,  86,
   4, 12, 20,  28,  44,  52,  68,  76,  36,  92, 116,  60, 124, 148, 164, 172,
   8, 24, 40,  56,  88, 104, 136, 152,  72, 184, 232, 120, 248, 296, 328, 344,
  16, 48, 80, 112, 176, 208, 272, 304, 144, 368, 464, 240, 496, 592, 656, 688,
...
		

Crossrefs

Inverse: A254054.
Similar or related permutations: A135764, A253551, A064216, A254051.

Formula

A(row,col) = A135764(row, A249745(col)). [Is otherwise the same array as A135764, but the column positions have been permuted by A249745.]
A(row,col) = 2^(row-1) * ((2*A249745(col))-1) = 2^(row-1) * A254050(col). [The above expands to this.]
a(n) = A064989(A135765(n)).
As a composition of other permutations:
a(n) = A064216(A254051(n)). [As an array: A(row,col) = A064216(A254051(row,col)).]

A285702 a(n) = A000010(A064216(n)).

Original entry on oeis.org

1, 1, 2, 4, 2, 6, 10, 2, 12, 16, 4, 18, 6, 4, 22, 28, 6, 8, 30, 10, 36, 40, 4, 42, 20, 12, 46, 12, 16, 52, 58, 8, 20, 60, 18, 66, 70, 6, 24, 72, 8, 78, 24, 22, 82, 40, 28, 32, 88, 12, 96, 100, 8, 102, 106, 30, 108, 36, 20, 48, 42, 36, 18, 112, 40, 126, 64, 8, 130, 136, 42, 60, 44, 20, 138, 148, 24, 56, 150, 46, 72, 156, 12, 162, 110, 32, 166, 24, 52, 172, 178
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2017

Keywords

Crossrefs

Odd bisection of the following sequences: A347115, A348045, A349127, A349128.

Programs

  • Mathematica
    Table[EulerPhi@ If[n == 1, 1, Apply[Times, FactorInteger[2 n - 1] /. {p_, e_} /; p > 2 :> NextPrime[p, -1]^e]], {n, 91}] (* Michael De Vlieger, Apr 26 2017 *)
  • Scheme
    (define (A285702 n) (A000010 (A064216 n)))

Formula

a(n) = A000010(A064216(n)).
Sum_{k=1..n} a(k) ~ c * n^2, where c = Product_{p prime} (p^3/((p+1)*(p^2-q(p)))) = 0.5366875995..., where q(p) = prevprime(p) (A151799) if p > 2 and q(2) = 1. - Amiram Eldar, Dec 21 2023

A286243 Filter-sequence: a(n) = A278222(A064216(n)).

Original entry on oeis.org

2, 2, 4, 6, 2, 8, 12, 4, 12, 6, 6, 12, 6, 2, 24, 24, 8, 16, 32, 12, 30, 30, 4, 60, 12, 12, 48, 30, 6, 60, 72, 6, 6, 48, 12, 12, 24, 6, 12, 30, 2, 48, 24, 24, 60, 72, 24, 36, 60, 8, 12, 60, 16, 72, 180, 32, 180, 24, 12, 6, 12, 30, 36, 24, 30, 128, 210, 4, 12, 30, 60, 60, 30, 12, 60, 210, 12, 120, 120, 48, 96, 120, 30, 60, 48, 6, 120, 60, 60, 420, 180, 72, 120
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Cf. A254044 (one of the matching sequences).

Programs

Formula

a(n) = A278222(A064216(n)).
Showing 1-10 of 118 results. Next