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-75 of 75 results.

A291880 Numbers n such that phi(n) - 1 | sigma(n).

Original entry on oeis.org

3, 4, 5, 6, 8, 10, 20, 22, 40, 76, 80, 108, 160, 204, 320, 640, 1072, 1280, 2560, 4192, 5120, 10240, 20480, 40960, 49344, 81920, 163840, 327680, 655360, 1310720, 2621440, 4197376, 5242880, 10485760, 20971520, 41943040, 83886080, 167772160, 268460032, 335544320, 671088640, 1073790976, 1342177280, 2684354560, 5368709120
Offset: 1

Views

Author

Paolo P. Lava, Sep 05 2017

Keywords

Comments

Numbers n such that A109606(n) | A000203(n).
All numbers of the form 5*2^x, with x >= 0, are part of the sequence (A020714).
Values of the ratio sigma(n)/(phi(n)-1) are 4, 7, 2, 12, 5, 6, 6, 4, 6, 4, 6, 8, 6, 8, 6, 6, 4, 6, 6, 4, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 6, 4, 6, ...
Sequence contains also terms of the form 2^(n-2)*(2^n+3) where 2^n+3 is a prime and n > 3, like 22, 76, 1072, 4192, 4197376, 268460032. See A057733 for primes of the form 2^n+3. - Michel Marcus, Sep 17 2017

Examples

			sigma(1072) = 2108, phi(1072) = 528 and 2108/(528 - 1) = 4.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local n; for n from 3 to q do
    if type(sigma(n)/(phi(n)-1),integer) then  print(n); fi; od;  end: P(10^7);
  • Mathematica
    Select[Range[3, 10^6], Divisible[DivisorSigma[1, #], EulerPhi[#] - 1] &] (* Michael De Vlieger, Sep 06 2017 *)
  • PARI
    isok(n) = denominator(sigma(n)/(eulerphi(n)-1)) == 1; \\ Michel Marcus, Sep 06 2017

Extensions

a(34)-a(41) from Michel Marcus, Sep 15 2017
a(42)-a(45) from Michel Marcus, Sep 21 2017

A320227 Assuming the truth of the Collatz conjecture, let T(n,i), i = 1..k be the initial k elements of the Collatz trajectory of n, up to when the first 1 appears, but excluding the 1. a(n) is the number of ordered pairs T(n,i) < T(n,j) such that gcd(T(n,i), T(n,j)) = 1.

Original entry on oeis.org

0, 0, 10, 0, 4, 11, 58, 0, 84, 4, 40, 12, 12, 62, 47, 0, 25, 89, 89, 4, 6, 43, 36, 13, 117, 13, 3395, 66, 66, 49, 3064, 0, 148, 27, 21, 94, 94, 94, 286, 4, 3246, 6, 184, 46, 42, 39, 2924, 14, 122, 122, 120, 14, 14, 3435, 3374, 70, 231, 70, 247, 51, 63, 3101
Offset: 1

Views

Author

Michel Lagneau, Oct 08 2018

Keywords

Comments

If the number 1 of the Collatz trajectory is included, we obtain the new sequence b(n) = a(n) + A006577(n).
We observe interesting properties for the even and odd values of a(n).
First case: a(n) = 0, 4, 6, ..., 2i, ...
When a(n) = q even, there exists a subset N(q) = {n_1, n_2, ...} such that a(n_i) = q for i = 1, 2, ... We observe that N(q) = N1(q) union N2(q) (see the table below). Conjecturally, for n = 12, 14, 16, ... N1(q) is finite and the last two elements of the set N1(q) are of the form x and x+1.
The elements of N2(q) are of the form {((4^m - 1)/3)*2^k}, k = 0, 1, ... with m = a(n)/2. The set N2(q) is infinite.
Second case: a(n) = 11, 13, 15, ...
Conjecturally, N1(q) is finite and the last two elements of the set N1(q) are of the form y and y+2.
Conjecture: N2(q) = { }.
The following table gives the first 17 values of a(n) in ascending order with the corresponding subsets N1(q) and N2(q).
+----+--------------------------------------------------------------------+
|a(n)| N1(a(n)) |
+----+--------------------------------------------------------------------+
| 0 |{ } |
| 4 |{ } |
| 6 |{ } |
| 8 |{ } |
| 10 |{3} |
| 11 |{6} |
| 12 |{12, 13} |
| 13 |{24, 26} |
| 14 |{48, 52, 53} |
| 15 |{96, 104, 106} |
| 16 |{192, 208, 212, 213} |
| 17 |{384, 416, 424, 426} |
| 18 |{768, 832, 848, 852, 853} |
| 19 |{113, 1536, 1664, 1696, 1704, 706} |
| 20 |{226, 3072, 3328, 3392, 3408, 3412, 3413} |
| 21 |{35, 452, 453, 6144, 6656, 6784, 6816, 6824, 6826} |
| 22 |{70, 227, 904, 906, 12288, 13312, 13568, 13632, 13648, 13652, 13653}|
+----+--------------------------------------------------------------------+
+----+--------------------------------------------------------------------+
|a(n)| N2(a(n)) |
+----+--------------------------------------------------------------------+
| 0 |{1, 2, 4, 8, 16, 32, ..., 2^k, ... } (A000079) |
| 4 |{5, 10, 20, 40, 80, ..., 5*2^k, ...} (A020714) |
| 6 |{21, 42, 84, 168, 336, 672, ..., ((4^3 - 1)/3)*2^k, ...} (A175805) |
| 8 |{85, 170, 340, 680, ..., ((4^4 - 1)/3)*2^k, ...} |
| 10 |{341, 682, 1364, 2728, ..., ((4^5 - 1)/3)*2^k, ...} |
| 11 | { } |
| 12 |{1365, 2730, 5460, ...,((4^6 - 1)/3)*2^k, ...} |
| 13 | { } |
| 14 |{5461, 10922, ..., ((4^7 - 1)/3)*2^k, ...} |
| 15 | { } |
| 16 |{21845, 43690, ...,((4^8 - 1)/3)*2^k, ...} |
| 17 | { } |
| 18 |{87381, 174762, ...,((4^9 - 1)/3)*2^k, ...} |
| 19 | { } |
| 20 |{349525, 699050, ..., ((4^10 - 1)/3)*2^k, ...} |
| 21 | { } |
| 22 |{1398101, 2796202, ..., ((4^11 - 1)/3)*2^k, ...} |
+----+--------------------------------------------------------------------+

Examples

			a(3) = 10 because the Collatz trajectory T(3,i) of 3 up to the number 1 is 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2  and gcd(T(i), T(j)) = 1 for the 10 following pairs of elements of T: (2, 3), (2, 5), (3, 4), (3, 5), (3, 8), (3, 10), (3, 16), (4, 5), (5, 8) and (5, 16). 28
In the general case, a(n) = 10 for n in the set {3} union {341, 682, 1364, 2728, ...,((4^5 - 1)/3)*2^k, ...} with k = 0, 1, 2, ...
a(6) = 11 because the Collatz trajectory T(6,i) of 6 up to the number 1 is 6 -> 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2  and gcd(T(i), T(j)) = 1 for the 11 following pairs of elements of T: (2, 3), (2, 5), (3, 4), (3, 5), (3, 8), (3, 10), (3, 16), (4, 5), (5, 6), (5, 8) and (5, 16).
		

Crossrefs

Programs

  • Maple
    nn:=1000:
    for n from 1 to 200 do:
       m:=n:lst:={}:
          for i from 1 to nn while(m<>1) do:
            if irem(m, 2)=0
             then
             lst:=lst union {m}:m:=m/2:
             else
             lst:=lst union {m}:m:=3*m+1:
           fi:
         od:
        n0:=nops(lst):it:=0:
         for j from 1 to n0-1 do:
          for k from j+1 to n0 do:
           if gcd(lst[j],lst[k])=1
           then
            it:=it+1:
            else fi:
        od:
        od:
      printf(`%d, `,it):
    od:

Extensions

Definition revised by N. J. A. Sloane, Nov 12 2018

A323097 Numbers m such that all elements of the Collatz trajectory occur in the divisors of m.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 1280, 1344, 2048, 2560, 2688, 4096, 5120, 5376, 8192, 10240, 10752, 16384, 20480, 21504, 21760, 32768, 40960, 43008, 43520, 65536, 81920, 86016, 87040, 131072, 163840, 172032, 174080, 262144, 327680
Offset: 1

Views

Author

Michel Lagneau, Aug 30 2019

Keywords

Comments

See A207674 (numbers such that all divisors occur in their Collatz trajectories).
The powers of 2 are in the sequence.
The number 80 is probably the unique non-power of 2 of the sequence such that the elements of the Collatz trajectory are exactly the same as the divisors.
The numbers 5*2^k (A020714) for k > 3 are in the sequence.
The numbers 21*2^k (A175805) for k > 5 are in the sequence.
The numbers 85*2^k for k > 7 are in the sequence.
In the general case, the numbers of the form ((4^i - 1)/3)*2^j for i = 1, 2,... and j = 2i, 2i+1, 2i+2, ... are in the sequence.

Examples

			1344 is in the sequence because the set of the divisors {1, 2, 3, 4, 6, 7, 8, 12, 14, 16, 21, 24, 28, 32, 42, 48, 56, 64, 84, 96, 112, 168, 192, 224, 336, 448, 672, 1344} contains the set of the elements of the Collatz trajectory 1344 -> 672 -> 336 -> 168 -> 84 -> 42 -> 21 -> 64 -> 32 -> 16 -> 8 -> 4 -> 2 -> 1
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=250000:
      for n from 1 to nn do:
        m:=n:it:=0:lst:={n}:
          for i from 1 to nn while(m<>1) do:
            if irem(m, 2)=0
             then
             m:=m/2:
             else
             m:=3*m+1:
            fi:
           it:=it+1:lst:=lst union {m}:
          od:
           x:=divisors(n):n0:=nops(x):lst1:={op(x), x[n0]}:
           lst2:=lst intersect lst1:n1:=nops(lst2):
           if lst2=lst
           then
           printf(`%d, `,n):
           else fi:
         od:
  • Mathematica
    aQ[n_] := n == LCM @@ NestWhileList[If[OddQ[#], 3 # + 1, #/2] &, n, # > 1 &]; Select[Range[330000], aQ] (* Amiram Eldar, Aug 31 2019 *)

A344109 a(n) = (5*2^n + 7*(-1)^n)/3.

Original entry on oeis.org

4, 1, 9, 11, 29, 51, 109, 211, 429, 851, 1709, 3411, 6829, 13651, 27309, 54611, 109229, 218451, 436909, 873811, 1747629, 3495251, 6990509, 13981011, 27962029, 55924051, 111848109, 223696211, 447392429, 894784851, 1789569709, 3579139411, 7158278829, 14316557651, 28633115309, 57266230611, 114532461229, 229064922451
Offset: 0

Views

Author

Paul Curtz, May 09 2021

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,2}, {4,1}, 28] (* Amiram Eldar, May 10 2021 *)

Formula

a(n+1) = 5*2^n - a(n) for n >= 0, with a(0) = 4.
a(n+2) = 5*2^n + a(n) for n >= 0, with a(0) = 4, a(1) = 1.
a(n+3) = 15*2^n - a(n) for n >= 0, with a(0) = 4, a(1) = 1, a(2) = 9.
a(n) = A001045(n+2) + A154879(n).
a(2*n+1) = A321421(n).
a(n) = a(n-1) + 2*a(n-2) for n >= 2. - Pontus von Brömssen, May 09 2021
G.f.: (4 - 3*x)/(1 - x - 2*x^2). - Stefano Spezia, May 10 2021
a(n) = 2*A014551(n) - A001045(n).
a(n) = abs(A156550(n)) - (-1)^n.
a(n+3) = a(n) + 7*A084214(n+1) for n >= 0, with a(0) = 4.
a(n) = 5*A001045(n+1) - A084214(n+1) for n >= 0.
a(n) = A084214(n+1) + 3*(-1)^n for n >= 0.

A352692 a(n) + a(n+1) = 2^n for n >= 0 with a(0) = 4.

Original entry on oeis.org

4, -3, 5, -1, 9, 7, 25, 39, 89, 167, 345, 679, 1369, 2727, 5465, 10919, 21849, 43687, 87385, 174759, 349529, 699047, 1398105, 2796199, 5592409, 11184807, 22369625, 44739239, 89478489, 178956967, 357913945, 715827879, 1431655769, 2863311527, 5726623065, 11453246119, 22906492249
Offset: 0

Views

Author

Paul Curtz, Mar 29 2022

Keywords

Comments

Difference table D(n,k) = D(n-1,k+1) - D(n-1,k), D(0,k) = a(k):
4, -3, 5, -1, 9, 7, 25, ...
-7, 8, -6, 10, -2, 18, 14, 50, ...
15, -14, 16, -12, 20, -4, 36, 28, 100, ...
-29, 30, -28, 32, -24, 40, -8, 72, 56, 200, ...
59, -58, 60, -56, 64, -48, 80, -16, 144, 112, 400, ...
...
The diagonals are given by D(n,n+k) = a(k)*2^n.
D(n,1) = -(-1)^n* A340627(n).
a(n) - a(n) = 0, 0, 0, 0, 0, ... (trivially)
a(n+1) + a(n) = 1, 2, 4, 8, 16, ... = 2^n (by definition)
a(n+2) - a(n) = 1, 2, 4, 8, 16, ... = 2^n
a(n+3) + a(n) = 3, 6, 12, 24, 48, ... = 2^n*3
a(n+4) - a(n) = 5, 10, 20, 40, 80, ... = 2^n*5
a(n+5) + a(n) = 11, 22, 44, 88, 176, ... = 2^n*11
(...)
This table is given by T(r,n) = A001045(r)*2^n with r, n >= 0.
Sums of antidiagonals are A045883(n).
Main diagonal: A192382(n).
First upper diagonal: A054881(n+1).
First subdiagonal: A003683(n+1).
Second subdiagonal: A246036(n).
Now consider the array from c(n) = (-1)^n*a(n) with its difference table:
4, 3, 5, 1, 9, -7, 25, -39, ... = c(n)
-1, 2, -4, 8, -16, 32, -64, 128, ... = -A122803(n)
3, -6, 12, -24, 48, -96, 192, -384, ... =
-9, 18, -36, 72, -144, 288, -576, 1152, ...
27, -54, 108, -216, 432, -864, 1728, -3456, ...
...
The first subdiagonal is -A000400(n). The second is A169604(n).

Crossrefs

If a(0) = k then A001045 (k=0), A078008 (k=1), A140966 (k=2), A154879 (k=3), this sequence (k=4).
Essentially the same as A115335.

Programs

  • Maple
    a := proc(n) option remember; ifelse(n = 0, 4, 2^(n-1) - a(n-1)) end: # Peter Luschny, Mar 29 2022
    A352691 := proc(n)
        (11*(-1)^n + 2^n)/3
    end proc: # R. J. Mathar, Apr 26 2022
  • Mathematica
    LinearRecurrence[{1, 2}, {4, -3}, 40] (* Amiram Eldar, Mar 29 2022 *)
  • PARI
    a(n) = (11*(-1)^n + 2^n)/3; \\ Thomas Scheuerle, Mar 29 2022

Formula

abs(a(n)) = A115335(n-1) for n >= 1.
a(3*n) - (-1)^n*4 = A132805(n).
a(3*n+1) + (-1)^n*4 = A082311(n).
a(3*n+2) - (-1)^n*4 = A082365(n).
From Thomas Scheuerle, Mar 29 2022: (Start)
G.f.: (-4 + 7*x)/(-1 + x + 2*x^2).
Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(m + 2*n-k) = a(m)*2^n.
Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(1 + n-k) = -(-1)^n*A340627(n).
a(n) = (11*(-1)^n + 2^n)/3.
a(n + 2*m) = a(n) + A002450(m)*2^n.
a(2*n) = A192382(n+1) + (-1)^n*a(n).
a(n) = ( A045883(n) - Sum_{k=0..n-1}(-1)^k*a(k) )/n, for n > 0. (End)
a(n) = A001045(n) + 4*(-1)^n.
a(n+1) = 2*a(n) -11*(-1)^n.
a(n+2) = a(n) + 2^n.
a(n+4) = a(n) + A020714(n).
a(n+6) = a(n) + A175805(n).
a(2*n) = A163868(n).
a(2*n+1) = (2^(2*n+1) - 11)/3.

Extensions

Warning: The DATA is correct, but there may be errors in the COMMENTS, which should be rechecked. - Editors of OEIS, Apr 26 2022
Edited by M. F. Hasler, Apr 26 2022.
Previous Showing 71-75 of 75 results.