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.

User: Robert G. Wilson v

Robert G. Wilson v's wiki page.

Robert G. Wilson v has authored 4488 sequences. Here are the ten most recent ones:

A386528 Primes which remain primes after the mapping {1 -> 3, 3 -> 5, 5 -> 7, 7 -> 9, 9 -> 1} of its decimal digits.

Original entry on oeis.org

2, 3, 5, 19, 31, 37, 41, 59, 97, 131, 137, 151, 157, 181, 191, 199, 211, 227, 239, 271, 281, 307, 349, 359, 367, 409, 419, 457, 461, 479, 509, 541, 569, 619, 631, 641, 691, 727, 797, 821, 827, 829, 881, 907, 919, 947, 971, 977, 991, 1009, 1021, 1049, 1069, 1087, 1097, 1109, 1151
Offset: 1

Author

Tristan J. Jones and Robert G. Wilson v, Aug 21 2025

Keywords

Comments

Of the 10! possible nontrivial decimal digital mappings, this one was chosen for its inclusion of all the odd numbers and none of the even numbers.

Examples

			19 is a term since the mapping produces 31, which is prime;
31 is a term since the mapping produces 53, which is prime.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ[ FromDigits[ IntegerDigits[ n] /. {1 -> 3, 3 -> 5, 5 -> 7, 7 -> 9, 9 -> 1}]]; Select[ Prime@ Range@ 200, fQ]
  • Python
    from sympy import isprime
    def ok(n): return isprime(n) and isprime(int(str(n).translate(str.maketrans("13579","35791"))))
    print([k for k in range(1200) if ok(k)]) # Michael S. Branicky, Aug 24 2025

A385430 Least number k such that k and k + n! have the same number of divisors.

Original entry on oeis.org

2, 3, 5, 5, 7, 7, 11, 23, 17, 11, 17, 29, 46, 19, 43, 23, 31, 37, 89, 29, 31, 31, 97, 62, 41, 59, 47, 67, 159, 107, 127, 79, 37, 97, 61, 131, 86, 43, 97, 53, 61, 97, 71, 47, 94, 101, 233, 53, 83, 61, 249, 53, 71, 158, 71, 149, 107, 134, 254, 206, 166, 131, 271
Offset: 1

Author

Robert G. Wilson v, Jul 31 2025

Keywords

Comments

Inspired by A284783.
First differs from A037153 at n=13 (and when they differ a(n) is a composite < A037153(n)).

Examples

			a(1) = 2 since d(2) = d(3) = 2;
a(5) = 7 since d(7) = d(7+5!) = 2;
a(13) = 46 since d(46) = d(46+13!) = 4; etc.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{k = 2}, While[ DivisorSigma[0, k] != DivisorSigma[0, k + n!], k++]; k]; Array[ a, 51]
  • PARI
    a(n) = my(k=1); while (numdiv(k) != numdiv(k+n!), k++); k; \\ Michel Marcus, Aug 02 2025

Extensions

More terms from Sean A. Irvine, Aug 08 2025

A385364 Numbers whose cube is the sum of four distinct nonnegative cubes.

Original entry on oeis.org

13, 14, 18, 20, 23, 24, 26, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95
Offset: 1

Author

Robert G. Wilson v, Jul 29 2025

Keywords

Comments

Numbers v such that v^3 = w^3+x^3+y^3+z^3, w>x>y>z>=0, is soluble.
Inspired by A023042.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Length[ Select[ PowersRepresentations[ n^3, 4, 3], Union@# == # && #[[1]] > 0 &]] > 0; Select[ Range@ 95, fQ]

A385858 Numbers m in A385402 which are not prime.

Original entry on oeis.org

1, 35, 77, 95, 119, 125, 143, 187, 209, 221, 247, 259, 299, 319, 323, 377, 391, 403, 427, 437, 473, 493, 527, 551, 589, 629, 667, 697, 713, 731, 779, 799, 817, 851, 893, 899, 943, 989, 1007, 1073, 1139, 1147, 1189, 1199, 1219, 1247, 1271, 1313, 1333, 1343, 1357, 1363, 1387, 1397
Offset: 1

Author

Robert G. Wilson v, Jul 10 2025

Keywords

Comments

Since all the primes are in A385402, this sequence is more concise.

Crossrefs

Proper subset of A385402.

Programs

  • Mathematica
    fQ[m_] := Sum[ GCD[m, Floor[m/k]], {k, m}] == Sum[ GCD[m, Ceiling[m/k]], {k, m}]; j = 1; lst = {}; While[j < 1400, If[ !PrimeQ@ j && fQ@ j, AppendTo[lst, j]]; j++]; lst
  • PARI
    isok(m) = if (!isprime(m), sum(k=1, m, gcd(m, floor(m/k))) == sum(k=1, m, gcd(m, ceil(m/k)))); \\ Michel Marcus, Jul 10 2025

A385584 a(n) is the number of pairs (p, t) such that p is a pyramidal number, t is a triangular number, p + t <= n and t <= p.

Original entry on oeis.org

1, 2, 3, 3, 4, 5, 5, 6, 6, 6, 7, 8, 8, 9, 9, 9, 10, 10, 10, 10, 12, 13, 13, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 18, 19, 19, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 25, 26, 26, 27, 27, 27, 28, 29, 29, 29, 30, 30, 30, 30, 30, 31, 31, 31
Offset: 0

Author

Robert G. Wilson v, Jul 03 2025

Keywords

Comments

This sequence is nondecreasing.

Examples

			[n] #  solutions
----------------------------------------------------
[0] 1 [(0, 0)]
[1] 2 [(0, 0), (1, 0)]
[2] 3 [(0, 0), (1, 0), (1, 1)]
[3] 3 [(0, 0), (1, 0), (1, 1)]
[4] 4 [(0, 0), (1, 0), (1, 1), (4, 0)]
[5] 5 [(0, 0), (1, 0), (1, 1), (4, 0), (4, 1)]
[6] 5 [(0, 0), (1, 0), (1, 1), (4, 0), (4, 1)]
[7] 6 [(0, 0), (1, 0), (1, 1), (4, 0), (4, 1), (4, 3)]
[8] 6 [(0, 0), (1, 0), (1, 1), (4, 0), (4, 1), (4, 3)]
[9] 6 [(0, 0), (1, 0), (1, 1), (4, 0), (4, 1), (4, 3)]
		

Crossrefs

Programs

  • Python
    def a(n: int) -> int:
        count = 0
        for p in range(n + 1):
            pv = p * (p + 1) * (p + 2) // 6
            if pv > n: break
            for t in range(n - p + 1):
                tv = t * (t + 1) // 2
                if pv + tv <= n and tv <= pv:
                    count += 1
        return count
    print([a(n) for n in range(74)])  # Peter Luschny, Jul 10 2025

Formula

a(n) = card({(t in A000217, p in A000292) : t <= p, t + p <= n}). - Peter Luschny, Jul 10 2025

Extensions

New name and two terms (n=4 and n=20) corrected by Peter Luschny, Jul 10 2025

A385074 Index of the first occurrence of n in A385073.

Original entry on oeis.org

1, 2, 20737, 4, 9, 6, 3763, 20, 40369, 35, 2951, 16, 35622023, 27, 2041, 49, 25, 42, 697, 2168, 18537061, 31958, 117, 66, 356698651, 147, 7863277, 28
Offset: 0

Author

Robert G. Wilson v, Jun 16 2025

Keywords

Comments

a(28) if it exists exceeds 10^11.
Although the parity of n and a(n) are often the opposite, it is not a requirement. Cases in point, n = {9, 13, 15, 25}.

Crossrefs

Cf. A385073.

Programs

  • Mathematica
    f[n_] := Block[{b = 2}, While[GCD[n, b] > 1, b++]; PowerMod[b, n - 1, n]]; k = 1; t[_] := 0; While[ k < 10^10, a = f@k; If[ a < 1001 && t[a] == 0, t[a] = k]; k++]; t /@ Range[0, 27]
  • PARI
    f(n) = forprime(p=2, , if(n%p, return(lift(Mod(p, n)^(n-1))))); \\ A385073
    a(n) = my(k=1); while (f(k) != n, k++); k; \\ Michel Marcus, Jun 18 2025

A385073 a(n) = b^(n-1) mod n, where b = A053669(n) is the least integer greater than 1 and coprime to n.

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 1, 3, 4, 3, 1, 5, 1, 3, 4, 11, 1, 11, 1, 7, 4, 3, 1, 5, 16, 3, 13, 27, 1, 7, 1, 11, 4, 3, 9, 29, 1, 3, 4, 27, 1, 17, 1, 27, 31, 3, 1, 29, 15, 33, 4, 27, 1, 11, 49, 3, 4, 3, 1, 43, 1, 3, 4, 43, 16, 23, 1, 27, 4, 13, 1, 29, 1, 3, 34, 27, 9, 5, 1, 27, 40, 3, 1, 17
Offset: 1

Author

Robert G. Wilson v, Jun 16 2025

Keywords

Comments

Inspired by Fermat's Little Theorem.
a(n) > 0 for n > 1 since n and b are coprime.

Crossrefs

Programs

  • Maple
    f:= proc(n) local b;
      b:= 2;
      while n mod b = 0 do b:= nextprime(b) od;
      b &^ (n-1) mod n
    end proc:
    f(1):= 0:
    map(f, [$1..100]); # Robert Israel, Jun 18 2025
  • Mathematica
    a[n_] := Block[{b = 2}, While[GCD[n, b] > 1, b++]; PowerMod[b, n - 1, n]]; Array[a, 84]
  • PARI
    a(n) = forprime(p=2, , if(n%p, return(lift(Mod(p, n)^(n-1))))); \\ Michel Marcus, Jun 18 2025

Formula

a(n) = 0 iff n = 1.
a(n) = 1 iff n belongs to A000040, A001567, or A130433.
a(n) = 2 iff n>1 and belongs to A173572;
a(n) = 4 iff n belongs to A033553;
a(n) = 8 iff n>7 and belongs to either A033984 or A173138;
a(n) = 16 iff n>15 and belongs to A276968;
a(n) = 32 iff n>1 and belongs to A215610;
a(n) = 64 iff n>63 and belongs to A276969;
a(n) = 128 iff n>127 and belongs to A215611;
a(n) = 256 iff n>255 and belongs to A276970;
a(n) = 512 iff n>511 and belongs to A215612;
a(n) = 1024 iff n>1023 and belongs to A276971;
a(n) = 2048 iff n>2047 and belongs to A215613;
From Robert Israel, Jun 18 2025: (Start)
a(2*p) = 3 if p is a prime > 3.
a(3*p) = 4 if p is a prime > 2.
a(4*p) = 3^3 if p is a prime > 5.
a(6*p) = 5^5 if p is a prime > 509.
a(8*p) = 3^5 if p is a prime > 271.
a(10*p) = 3^9 if p is a prime > 1951.
a(12*p) = 5^11 if p is a prime > 4069003. (End)

A383816 Palindromic primes which satisfy the requirements of A380943 in at least two ways.

Original entry on oeis.org

373, 1793971, 7933397, 374636473, 714707417, 727939727, 787333787, 790585097, 947939749, 991999199, 10253935201, 11365556311, 11932823911, 13127372131, 34390609343, 35369996353, 35381318353, 36297179263, 37018281073, 37423332473, 37773537773, 38233333283, 38914541983, 39064546093
Offset: 1

Author

Keywords

Comments

Terms of A380943 are primes whose decimal representation is the concatenation of primes p and q such that the concatenation of q and p also forms a prime.

Examples

			The palindromic prime 373 meets the requirements of A380943 in two ways: the concatenation of 3 and 37 forms the prime 337, and the concatenation of 73 and 3 forms the prime 733.
Although 37673 is a palindrome where 3, 7673, and 76733 are all primes and 3767, 3, and 33767 are all primes, the palindrome is not prime and is therefore not in the sequence.
		

Crossrefs

Subsequence of A383810.

Programs

  • Mathematica
    f[n_] := Block[{cnt = 0, id = IntegerDigits@ n, k = 1, len, p, q, qp}, len = Length@ id; While[k < len, p = Take[id, k]; q = Take[id, -len + k]; qp = FromDigits[Join[q, p]]; If[ PrimeQ@ FromDigits@ p && PrimeQ@ FromDigits@ q && PrimeQ@ qp && IntegerLength@ qp == len, cnt++]; k++]; cnt]; fQ[n_] := Reverse[idn = IntegerDigits@ n] == idn && f@ n > 1; Select[ Prime@ Range@ 3000000, fQ]

A383815 Palindromic primes in A380943.

Original entry on oeis.org

313, 373, 797, 11311, 13331, 13931, 17971, 19991, 31013, 35353, 36263, 36563, 38783, 71317, 79397, 97379, 98389, 1129211, 1196911, 1611161, 1793971, 1982891, 3106013, 3166613, 3193913, 3236323, 3288823, 3304033, 3319133, 3329233, 3365633, 3417143, 3447443, 3449443, 3515153, 3670763
Offset: 1

Author

Keywords

Comments

A380943 requires that primes, p_n, written in decimal representation by the concatenation of primes p and q such that the concatenation of q and p also forms a prime.
Intersection of A002385 and A380943.

Examples

			The palindromic prime 313 is formed by the concatenation of the primes 31 and 3, which reversed, also form the prime 331. The palindromic prime 13931 is formed by the concatenation of 139 and 31; 31139 is also prime.
		

Programs

  • Maple
    rev:= proc(n) local L,i;
       L:= convert(n,base,10);
       add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    tcat:= proc(x,y) y + 10^(ilog10(y)+1)*x end proc:
    filter:= proc(z) local i,x,y;
      if not isprime(z) then return false fi;
      for i from 1 to ilog10(z) do
        x:= z mod 10^i;
        if x < 10^(i-1) then next fi;
        y:= (z-x)/10^i;
        if isprime(x) and isprime(y) and isprime(tcat(x,y)) then return true fi;
      od;
      false
    end proc:
    N:= 7: # for terms of up to 7 digits
    R:= NULL:
    for d from 1 to (N-1)/2 do
      for x from 10^(d-1) to 10^d-1 do
        for y from 0 to 9 do
          z:= rev(x) + 10^d * y + 10^(d+1)*x;
          if filter(z) then R:= R,z fi
    od od od:
    R;  # Robert Israel, Jun 08 2025
  • Mathematica
    f[n_] := Block[{cnt = 0, id = IntegerDigits@ n, k = 1, len, p, q, qp}, len = Length@ id; While[k < len, p = Take[id, k]; q = Take[id, -len + k]; qp = FromDigits[Join[q, p]]; If[ PrimeQ@ FromDigits@ p && PrimeQ@ FromDigits@ q && PrimeQ@ qp && IntegerLength@ qp == len, cnt++]; k++]; cnt]; fQ[n_] := Reverse[idn = IntegerDigits@ n] == idn && f@ n > 0; Select[ Prime@ Range@ 264000, fQ]

A383814 Least number which satisfies the requirements of A380943 in exactly n ways.

Original entry on oeis.org

2, 37, 373, 19937, 257931013, 4199993923
Offset: 0

Author

Keywords

Comments

The requirements of A380943 are that primes, p_n, written in decimal representation by the concatenation of primes p and q such that the concatenation of q and p also forms a prime.

Examples

			See the examples in A383810 through A383813.
		

Programs

  • Mathematica
    f[n_] := Block[{cnt = 0, id = IntegerDigits@ n, k = 1, len, p, q, qp}, len = Length@ id; While[k < len, p = Take[id, k]; q = Take[id, -len + k]; qp = FromDigits[ Join[q, p]]; If[ PrimeQ[FromDigits[p]] && PrimeQ[FromDigits[q]] && PrimeQ[qp] && IntegerLength[qp] == len, cnt++]; k++]; cnt];a[n_]:=Module[{k=1},While[f[Prime[k]]!=n,k++];Prime[k]];Array[a,4,0]