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 21-30 of 62 results. Next

A325960 a(n) is k-n for the least k >= n+(A020639(n)-1) such that n-k and n-(sigma(n)-k) are relatively prime, or 0 if no such k <= sigma(n) exists.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 5, 1, 0, 1, 0, 1, 3, 1, 0, 1, 4, 1, 3, 1, 0, 1, 0, 1, 5, 1, 5, 1, 0, 1, 3, 1, 0, 1, 0, 1, 5, 1, 0, 1, 6, 1, 7, 1, 0, 1, 5, 1, 3, 1, 0, 1, 0, 1, 3, 1, 5, 1, 0, 1, 5, 1, 0, 1, 0, 1, 3, 1, 7, 1, 0, 1, 2, 1, 0, 1, 5, 1, 5, 1, 0, 1, 9, 1, 3, 1, 9, 1, 0, 1, 5, 1, 0, 1, 0, 1, 5
Offset: 1

Views

Author

Antti Karttunen, May 29 2019

Keywords

Comments

By definition, if n is neither an odd prime nor an odd perfect number, then a(n) >= (A020639(n)-1).

Crossrefs

Cf. A006005 (positions of zeros, provided no odd perfect numbers exist).

Programs

  • PARI
    A020639(n) = if(1==n, n, factor(n)[1, 1]);
    A325960(n) = { my(s=sigma(n)); for(i=(-1)+n+A020639(n), s, if(1==gcd(n-i, n-(s-i)), return(i-n))); (0); };

Formula

a(n) = (A325961(n) - A325962(n)) / 2, assuming no odd perfect numbers exist.
a(2n) = 1.

A333570 Number of nonnegative values c such that c^n == -c (mod n).

Original entry on oeis.org

1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 1, 4, 1, 4, 3, 2, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 8, 1, 8, 1, 2, 1, 4, 3, 4, 1, 4, 3, 4, 1, 8, 1, 4, 1, 4, 1, 4, 1, 4, 3, 8, 1, 4, 3, 4, 1, 4, 1, 8, 1, 4, 1, 2, 1, 24, 1, 4, 1, 16, 1, 4, 1, 4, 3, 8, 1, 8, 1, 4, 1, 4, 1, 8, 5, 4, 3, 4, 1, 8, 7, 4, 1, 4, 3
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 27 2020

Keywords

Comments

a(n) is the number of nonnegative bases c < n such that c^n + c == 0 (mod n).
a(2^k) = 2 for k > 0.
a(p^m) = 1 for odd prime p with m >= 0.
Let fy(n) = (the number of values b in Z/nZ such that b^y = b)/(the number of values c in Z/nZ such that -c^y = c) for nonnegative y, then:
f0(n) = A000012(n),
f1(n) = A026741(n),
f2(n) = A000012(n),
1 <= f3(n) <= n,
f4(n) = A000012(n), ...,
1 <= fn(n) = A182816(n)/a(n) <= n, where fn(n) = n for odd noncomposite numbers A006005 and Carmichael numbers A002997.

Crossrefs

Programs

  • Magma
    [#[c: c in [0..n-1] | -c^n mod n eq c]: n in [1..95]];
    
  • PARI
    a(n) = sum(c=1, n, Mod(c, n)^n == -c); \\ Michel Marcus, Mar 27 2020

Formula

a(n) = A182816(n)/r for some odd r.

A162800 a(n) = n-th grid point that is covered by the zig-zag function for prime numbers such that the grid point is a vertex in the graph of the function.

Original entry on oeis.org

0, 2, 4, 6, 9, 12, 15, 18, 21, 26, 30, 34, 39, 42, 45, 50, 56, 60, 64, 69, 72, 76, 81, 86, 93, 99, 102, 105, 108, 111, 120, 129, 134, 138, 144, 150, 154, 160, 165, 170, 176, 180, 186, 192, 195, 198, 205, 217, 225, 228, 231, 236, 240, 246, 254, 260, 266, 270, 274, 279
Offset: 0

Views

Author

Omar E. Pol, Jul 16 2009

Keywords

Comments

Also {0, 2} together the numbers A024675.
See A162345 for the first differences.

Crossrefs

Programs

  • Mathematica
    Join[{0, 2}, Most[#] + Differences[#]/2] & [Prime[Range[2, 100]]] (* Paolo Xausa, Jun 17 2024 *)

Extensions

Edited by Omar E. Pol, Jul 18 2009

A348608 a(n) = Sum_{d|n, d <= sqrt(n)} (-1)^(d + n/d) * d.

Original entry on oeis.org

1, -1, 1, 1, 1, -3, 1, 1, 4, -3, 1, -2, 1, -3, 4, 5, 1, -6, 1, -3, 4, -3, 1, 2, 6, -3, 4, -3, 1, -11, 1, 5, 4, -3, 6, 0, 1, -3, 4, 0, 1, -12, 1, -3, 9, -3, 1, 8, 8, -8, 4, -3, 1, -12, 6, -2, 4, -3, 1, -5, 1, -3, 11, 13, 6, -12, 1, -3, 4, -15, 1, 0, 1, -3, 9, -3, 8, -12, 1, 8
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 25 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, (-1)^(# + n/#) # &, # <= Sqrt[n] &], {n, 1, 80}]
    nmax = 80; CoefficientList[Series[Sum[k x^(k^2)/(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
  • PARI
    a(n) = sumdiv(n, d, if (d<=sqrt(n), (-1)^(d + n/d)*d)); \\ Michel Marcus, Oct 25 2021

Formula

G.f.: Sum_{k>=1} k * x^(k^2) / (1 + x^k).
a(n) = 1 if n = 1 or n is an odd prime (A006005) or n = 4 or n = 8. - Bernard Schott, Dec 18 2021
a(n) = A037213(n) - A348953(n). - Ridouane Oudra, Aug 21 2025

A383300 Numbers k such that primorial base expansion of k has the primorial base expansion of k' as its suffix, where k' stands for the arithmetic derivative of k (A003415).

Original entry on oeis.org

0, 1, 3, 4, 5, 7, 11, 13, 17, 19, 23, 27, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331
Offset: 1

Views

Author

Antti Karttunen, May 15 2025

Keywords

Comments

a(n) = A348283(n) for n=1 and n=3..334432. a(334433) = 4784261, which is not present in A348283 (see examples). - R. J. Mathar and Antti Karttunen, May 16 2025

Examples

			0 is a term as A003415(0) = 0.
1 is a term as A003415(1) = 0, whose primorial base expansion is here understood as an empty sequence of digits, thus it is a suffix of A049345(1) = 1.
3, like all odd primes, is a term as A003415(3) = 1, with A049345(3) = 11 and A049345(1) = 1.
4 and 27 are terms as they are in A051674 (the nonzero fixed points of A003415).
4784261 is a term as A003415(4784261) = 189671, with A049345(4784261) = 96411121 and A049345(189671) = 6411121. 4784261 is the first term > 1 of this sequence that is not in A348283. See more examples in A383301.
		

Crossrefs

Disjoint union of {1}, A348283\{2} and A383301.
Cf. A006005, A051674 (other subsequences).
Subsequence of A383299.
Cf. also A383933.

Programs

  • PARI
    A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
    isA383300(n) = if(n<2, 1, my(p=2, k=A003415(n)); while(k, if((k%p)!=(n%p), return(0)); n = n\p; k = k\p; p = nextprime(1+p)); (1));
    
  • PARI
    A002110(n) = prod(i=1,n,prime(i));
    A235224(n) = { my(s=0, p=2); while(n, s++; n = n\p; p = nextprime(1+p)); (s); };
    isA383300(n) = { my(ad=A003415(n)); (n%A002110(A235224(ad))==ad); };

Formula

{k such that A003415(k) is equal to k modulo A002110(A235224(A003415(k)))}.

A108501 Number of factorizations of 4*n into even numbers.

Original entry on oeis.org

2, 3, 2, 5, 2, 4, 2, 7, 3, 4, 2, 7, 2, 4, 3, 11, 2, 6, 2, 7, 3, 4, 2, 12, 3, 4, 3, 7, 2, 7, 2, 15, 3, 4, 3, 12, 2, 4, 3, 12, 2, 7, 2, 7, 4, 4, 2, 19, 3, 6, 3, 7, 2, 8, 3, 12, 3, 4, 2, 14, 2, 4, 4, 22, 3, 7, 2, 7, 3, 7, 2, 21, 2, 4, 4, 7, 3, 7, 2, 19, 4, 4, 2, 14, 3, 4, 3, 12, 2, 11, 3, 7, 3, 4, 3, 30, 2
Offset: 1

Views

Author

Christian G. Bower, Jun 06 2005

Keywords

Comments

a(n) = 2 iff n is 1 or an odd prime (A006005); in this case, the two factorizations are 4n = 2 * 2n. - Bernard Schott, Nov 30 2020

Examples

			a(6)=4 because 6*4=24 can be factored as 24=12*2=6*4=6*2*2.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, i) option remember; `if`(n<=i, 1, 0)+
          add(`if`(d<=i and irem(d, 2)=0 and irem(n/d, 2)=0,
          b(n/d, min(d, i)), 0), d=divisors(n) minus {1, n})
        end:
    a:= n-> b(4*n$2):
    seq(a(n), n=1..100);  # Alois P. Heinz, Feb 17 2015
  • Mathematica
    b[n_, i_] := b[n, i] = If[n <= i, 1, 0] + Sum[If[d <= i && Mod[d, 2]==0 && Mod[n/d, 2]==0, b[n/d, Min[d, i]], 0], {d, Divisors[n][[2 ;; -2]]}];
    a[n_] := b[4n, 4n];
    Array[a, 100] (* Jean-François Alcover, Nov 05 2020, after Alois P. Heinz *)

Formula

a(2^k) = A000041(k+2). - Bernard Schott, Dec 01 2020

A162350 The path of the primes: Pairs (x,y) such that the points P(x,y) represent the position of the nonnegative integers in the graph of the "mountain path" function for prime numbers.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 2, 1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 4, 4, 5, 5, 5, 5, 4, 6, 4, 6, 5, 6, 6, 6, 7, 7, 7, 7, 6, 8, 6, 8, 7, 8, 8, 8, 9, 9, 9, 9, 8, 9, 7, 9, 6, 10, 6, 10, 7, 10, 8, 10, 9, 10, 10, 11, 10, 11, 9, 11, 8, 12, 8, 12, 9, 12, 10
Offset: 0

Views

Author

Omar E. Pol, Jul 03 2009

Keywords

Examples

			n ..... Point
0 ..... P(0,0)
1 ..... P(1,0)
2 ..... P(2,0)
3 ..... P(2,1)
4 ..... P(2,2)
5 ..... P(3,2)
6 ..... P(4,2)
7 ..... P(4,3)
8 ..... P(4,4)
9 ..... P(4,5)
10 .... P(5,5)
11 .... P(5,4)
		

Crossrefs

A383299 Numbers k such that A276086(k) is a multiple of A276086(A003415(k)), where A003415 is the arithmetic derivative, and A276086 is the primorial base exp-function.

Original entry on oeis.org

0, 1, 3, 4, 5, 7, 9, 11, 13, 15, 17, 19, 23, 27, 29, 31, 37, 41, 43, 45, 47, 51, 53, 59, 61, 67, 71, 73, 79, 83, 87, 89, 97, 101, 103, 107, 109, 113, 117, 119, 127, 131, 137, 139, 141, 147, 149, 151, 157, 161, 163, 165, 167, 171, 173, 177, 179, 181, 191, 193, 197, 199, 203, 207, 209, 211, 223, 227, 229, 233, 239
Offset: 1

Views

Author

Antti Karttunen, May 15 2025

Keywords

Comments

The sequence contains the intersection of A048103, A369650, and A328387. That is, {1, 15, 5005}, at least.

Examples

			5 is a term as A003415(5) = 1, and A276086(5) = 18 is a multiple of A276086(1) = 2, and ditto for all odd primes.
9 is a term as A003415(9) = 6, and A276086(9) = 30 is a multiple of A276086(6) = 5.
15 is a term as A003415(15) = 8, and A276086(15) = 150 is a multiple of A276086(8) = 15.
5005 is a term as A003415(5005) = 2556, and A276086(5005) = 39055266250 = 7803250 * A276086(2556) = 7803250 * 5005. See also A369650.
See also examples in A383300.
		

Crossrefs

Cf. A003415, A048103, A276086, A327859, A328387, A383298 (characteristic function).
Cf. A006005, A051674, A383300, A383301 (subsequences).
Cf. also A369650.

Programs

A061285 a(n) = 2^((prime(n) - 1)/2).

Original entry on oeis.org

2, 4, 8, 32, 64, 256, 512, 2048, 16384, 32768, 262144, 1048576, 2097152, 8388608, 67108864, 536870912, 1073741824, 8589934592, 34359738368, 68719476736, 549755813888, 2199023255552, 17592186044416, 281474976710656, 1125899906842624, 2251799813685248
Offset: 2

Views

Author

Labos Elemer, May 22 2001

Keywords

Comments

Square root of 2^(prime(n) - 1), i.e., the smallest number that has prime(n) divisors.

Crossrefs

Programs

  • Mathematica
    Table[2^((Prime[n] - 1)/2), {n, 2, 25}] (* Amiram Eldar, Dec 23 2020 *)

Formula

a(n) = sqrt(min(x; A000005(x) = prime(n))) = sqrt(A034785(n)/2) = sqrt(2^(prime(n) - 1)) = sqrt(2^A006093(n)) = sqrt(2^phi(prime(n))) = sqrt(2^A000010(A000040(n))).
Sum_{n>=1} 1/a(n) = A217054. - Amiram Eldar, Dec 23 2020

A224502 Prime numbers (together with one) whose representation in balanced ternary are palindromes.

Original entry on oeis.org

1, 7, 13, 43, 61, 73, 103, 367, 421, 457, 547, 601, 613, 757, 859, 1039, 1093, 3823, 4021, 4561, 4723, 4759, 5743, 6211, 6373, 6481, 6949, 7219, 7489, 7933, 8563, 8941, 9103, 9679, 29527, 30013, 31147, 31741, 33037, 35251, 36061, 36097, 36583, 37717, 39607, 41011, 42667, 43963, 44773, 45691, 47581, 49201
Offset: 1

Views

Author

Malachi de Ælfweald, Apr 08 2013

Keywords

Comments

Intersection of A006005 and A134027.

Examples

			For n=5, a(5)=61 and in balanced ternary notation is 1ī1ī1.
		

Programs

  • PARI
    bt(k,n)={
        sum(i=0,(n-1)\2,
            my(t=k%3-1);
            k\=3;
            n--;
            if(n==i,3^n,3^i+3^n)*t
        )
    };
    do(N)={
        my(v=List([1]),t);
        for(n=1,N,
            forstep(k=2,3^((n+1)\2)-1,3,
                t=bt(k,n);
                if(isprime(t),listput(v,t))
            )
        );
        vecsort(Vec(v))
    }; \\ Charles R Greathouse IV, Apr 08 2013
Previous Showing 21-30 of 62 results. Next