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

A294386 a(n) is the smallest number whose deficiency or abundance is equal to 2*n, or a(n) = 0 if such a number does not exist.

Original entry on oeis.org

6, 3, 5, 7, 22, 11, 13, 27, 17, 19, 46, 23, 112, 58, 29, 31, 250, 57, 37, 55, 41, 43, 94, 47, 60, 106, 53, 87, 84, 59, 61, 85, 108, 67, 142, 71, 73, 712, 158, 79, 156, 83, 405, 115, 89, 141, 406, 119, 97, 202, 101, 103, 214, 107, 109, 145, 113, 177, 418, 143, 120, 243, 192, 127, 262, 131, 261, 274, 137, 139, 574, 185
Offset: 0

Views

Author

Michel Marcus and Omar E. Pol, Oct 29 2017

Keywords

Comments

If A096502(n) <> 0, i.e., there is a prime p of the form 2^k - 2*n - 1, then 0 < a(n) <= 2^(k-1)*p since 2^(k-1)*p has deficiency 2*n. - Robert Israel, Oct 29 2017

Crossrefs

Bisection of A294347.
First differs from A217769 at a(12).

Programs

  • Maple
    N:= 100: # to get a(0)..a(N)
    count:= 0:
    for n from 1 while count < N+1 do
      d:= abs(2*n - numtheory:-sigma(n));
      if d::even and d <= 2*N and not assigned(A[d/2]) then
        count:= count+1; A[d/2]:= n;
      fi
    od:
    seq(A[i],i=0..N); # Robert Israel, Oct 29 2017
  • PARI
    a033879(n) = 2*n-sigma(n)
    a(n) = my(k=1); while(1, if(abs(a033879(k))==2*n, return(k)); k++) \\ Felix Fröhlich, Oct 29 2017

A294393 a(n) is the smallest number whose deficiency or abundance is equal to 2*n (or 0 if such a number does not exist), minus the n-th odd number.

Original entry on oeis.org

5, 0, 0, 0, 13, 0, 0, 12, 0, 0, 25, 0, 87, 31, 0, 0, 217, 22, 0, 16, 0, 0, 49, 0, 11, 55, 0, 32, 27, 0, 0, 22, 43, 0, 73, 0, 0, 637, 81, 0, 75, 0, 320, 28, 0, 50, 313, 24, 0, 103, 0, 0, 109, 0, 0, 34, 0, 62, 301, 24, -1, 120, 67, 0, 133, 0, 128, 139, 0, 0, 433, 42, 23, 151, 0, 0, 219, 82, 0, 28, 119
Offset: 0

Views

Author

Omar E. Pol, Oct 30 2017

Keywords

Comments

Note that a(60) = -1.

Examples

			--------------------------------------
n    A294386(n) - A005408(n)  =  a(n)
--------------------------------------
0        6            1           5
1        3            3           0
2        5            5           0
3        7            7           0
4       22            9          13
...
		

Crossrefs

Programs

  • PARI
    f(n) = abs(2*n-sigma(n));
    a(n) = my(k=1); while(f(k) != 2*n, k++); k - (2*n+1); \\ Michel Marcus, Oct 31 2017

Formula

a(n) = A294386(n) - A005408(n).

A294406 Positive odd numbers k such that both (sigma(m) - 2*m) and (2*m - sigma(m)) are never equal to k, where sigma(.) is the sum of divisors function A000203 (conjectured).

Original entry on oeis.org

9, 13, 15, 21, 23, 27, 29, 33, 35, 43, 45
Offset: 1

Views

Author

Omar E. Pol, Oct 30 2017

Keywords

Crossrefs

Intersection of A234285 and A234286.
Inspired by Michel Marcus's comment in A294347.

A374870 Let e(m) be the sum of all values of k satisfying the equation: (m mod k = floor((m - k)/k) mod k), minus 2*m (1 <= k <= m); then a(n) is the smallest m for which e(m) = n, or 0 if no e(m) has value n.

Original entry on oeis.org

39, 23, 5847, 735, 65, 29, 35, 77, 111, 173, 415, 185, 79, 47, 113, 137, 317, 867, 307, 543, 4843, 2153, 1203, 161, 59, 159, 351, 531, 1577, 475, 617, 89, 5321, 95, 11405, 1371, 107, 83, 219, 197, 199, 1855, 365, 6521, 3667, 8597, 131
Offset: 0

Views

Author

Lechoslaw Ratajczak, Sep 16 2024

Keywords

Comments

The three smallest values of n (n_1, n_2, n_3) for which a(n) is unknown after computing consecutive e(t) for 1 <= t <= z:
z | n_1 | n_2 | n_3 |
----------------------------------------
10^5 | 309 | 343 | 352 |
2*10^5 | 394 | 556 | 558 |
3*10^5 | 647 | 706 | 755 |
4*10^5 | 941 | 951 | 962 |
5*10^5 | 951 | 964 | 1069 |
Are there any values of n for which a(n) = 0?

Examples

			Let T(i,j) be the triangle read by rows: T(i,j) = 1 if i mod j = floor((i - j)/j) mod j, T(i,j) = 0 otherwise, for 1 <= j <= i.
The triangle begins:
i\j | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
-----------------------------------------
  1 | 1
  2 | 1 1
  3 | 1 0 1
  4 | 1 0 0 1
  5 | 1 1 0 0 1
  6 | 1 1 0 0 0 1
  7 | 1 0 1 0 0 0 1
  8 | 1 0 0 0 0 0 0 1
  9 | 1 1 0 1 0 0 0 0 1
 10 | 1 1 0 0 0 0 0 0 0 1
 11 | 1 0 1 0 1 0 0 0 0 0 1
 12 | 1 0 1 0 0 0 0 0 0 0 0 1
 13 | 1 1 0 0 0 1 0 0 0 0 0 0 1
 14 | 1 1 0 1 0 0 0 0 0 0 0 0 0 1
 15 | 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1
 ...
The j-th column has period j^2. Consecutive elements of this period are j X j identity matrix entries, read by rows.
a(0) = 39 because 39 is the smallest m for which e(m) = 0 (only k's satisfying the equation: 39 mod k = floor((39 - k)/k) mod k are: 1, 3, 7, 9, 19, 39, hence: 1+3+7+9+19+39-2*39 = 0 = e(39)).
a(2) = 5847 because 5847 is the smallest m for which e(m) = 2 (only k's satisfying the equation: 5847 mod k = floor((5847 - k)/k) mod k are: 1, 85, 135, 171, 343, 730, 1461, 2923, 5847, hence: 1+85+135+171+343+730+1461+2923+5847-2*5847 = 2 = e(5847)).
		

Crossrefs

Programs

  • VBA
    Sub calcul()
    For m = 1 To 500000
    s = 0
          For k = 1 To WorksheetFunction.Floor(m / 2, 1)
                If (m - WorksheetFunction.Floor((m - k) / k, 1)) Mod k = 0 Then
                s = s + k
                End If
          Next k
                       If s > m Then
                       e = s - m
                       v = WorksheetFunction.Ceiling(e / 1000000, 1)
                            If IsEmpty(Cells(e - (v - 1) * 1000000, v)) = False Then
                            Else
                            Cells(e - (v - 1) * 1000000, v).Value = m
                            End If
                       End If
    Next m
    End Sub
Showing 1-4 of 4 results.