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.

A337258 Primes p such that p and the prime next to p are both digitally balanced numbers in base 2 (A031443).

Original entry on oeis.org

37, 139, 557, 563, 613, 647, 653, 659, 2389, 2467, 2699, 2851, 8311, 8423, 8627, 8677, 8681, 8807, 8819, 9011, 9043, 9049, 9157, 9319, 9323, 9419, 9613, 9803, 9811, 9817, 9829, 9923, 10331, 10343, 10453, 10597, 11279, 11317, 11353, 11399, 11587, 11783, 11789
Offset: 1

Views

Author

Amiram Eldar, Nov 21 2020

Keywords

Comments

Prime p such that p and the prime next to p are both terms of A066196.

Examples

			37 is a term since it is a prime number, and both 37 and the next prime, 41, are digitally balanced in base 2: the binary representation of 37 is 100101, the binary representation of 41 is 101001, and both contain 3 0's and 3 1's.
		

Crossrefs

Programs

  • Mathematica
    digBalQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ@(m = Length@d) && Count[d, 1] == m/2]; p = Select[Range[3*10^4], PrimeQ]; p[[Position[Partition[digBalQ /@ p, 2, 1], {True, True}] // Flatten]]

A373460 Numbers k such that k and k+1 both have an equal number of even and odd digits.

Original entry on oeis.org

29, 49, 69, 89, 1009, 1029, 1049, 1069, 1089, 1209, 1229, 1249, 1269, 1289, 1409, 1429, 1449, 1469, 1489, 1609, 1629, 1649, 1669, 1689, 1809, 1829, 1849, 1869, 1889, 2109, 2129, 2149, 2169, 2189, 2309, 2329, 2349, 2369, 2389, 2509, 2529, 2549, 2569, 2589, 2709
Offset: 1

Views

Author

Amiram Eldar, Jun 07 2024

Keywords

Comments

The terms are of the form 100*m + j, where m is either 0 or a term of A227870 and j is in {29, 49, 69, 89} if m = 0 or in {9, 29, 49, 69, 89} if m > 0.

Examples

			29 is a term since it has one even digit (2) and one odd digit (9), and 29+1 = 30 also has one even digit (0) and one odd digit (3).
		

Crossrefs

Subsequence of A017377 and A227870.
Cf. A337238 (binary analog), A373505.

Programs

  • Mathematica
    q[n_] := Module[{d = Differences[Tally[Mod[IntegerDigits[n], 2]]]}, d != {} && d[[1, 2]] == 0]; Select[Range[3000], q[#] && q[# + 1] &]
  • PARI
    iseq(n) = {my(o = 0, e = 0); while(n > 0, if((n%10) % 2 == 0, e++, o++); n \= 10); e == o;}
    lista(kmax) = {my(q1 = 0, q2); for(k = 1, kmax, q2 = iseq(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2);}

Formula

a(n) = 100 * A227870(floor(n/5)) + 20 * (n mod 5) + 9, for n > 4.

A373505 Numbers k such that k and k+1 both have an equal number of odd and even digits in their factorial-base representations.

Original entry on oeis.org

25, 29, 37, 41, 55, 67, 73, 77, 85, 89, 103, 115, 727, 739, 745, 749, 757, 761, 775, 787, 793, 797, 805, 809, 823, 835, 841, 845, 853, 857, 889, 893, 901, 905, 937, 941, 949, 953, 967, 979, 985, 989, 997, 1001, 1015, 1027, 1033, 1037, 1045, 1049, 1063, 1075, 1081
Offset: 1

Views

Author

Amiram Eldar, Jun 07 2024

Keywords

Comments

If m is the sum of the first k odd-indexed factorial numbers (A000142), for k >= 2, then m-1 is a term, since the factorial-base representation of m is 1010...10, with the block "10" repeated k times, and the factorial-base representation of m-1 is the 1010...1001, with the block "10" repeated k-1 times and followed by "01" (these numbers are 25, 745, 41065, 3669865, 482671465, ...).

Examples

			25 is a term since the factorial-base representations of 25 and 26 are 1001 and 1010, respectively, and both have 2 odd digits and 2 even digits.
		

Crossrefs

Subsequence of A351895.
Similar sequences: A337238, A373460.

Programs

  • Mathematica
    With[{max = 7}, fctBaseDigits[n_] := IntegerDigits[n, MixedRadix[Range[max, 2, -1]]]; s = Select[Range[1, max!], EvenQ[Length[(d = fctBaseDigits[#])]] && Count[d, _?EvenQ] == Length[d]/2 &]; ind = Position[Differences[s], 1] // Flatten; s[[ind]]]
  • PARI
    iseq(n) = {my(p = 2, o = 0, e = 0); while(n > 0, if((n%p) %2  == 0, e++, o++); n \= p; p++); e == o;}
    lista(kmax) = {my(q1 = 0, q2); for(k = 1, kmax, q2 = iseq(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2);}

A351896 Numbers k such that k and k+2 both have an equal number of odd and even digits in their factorial-base representations.

Original entry on oeis.org

71, 743, 791, 839, 862, 910, 983, 1031, 1079, 1102, 1150, 1223, 1271, 1319, 1342, 1390, 1583, 1631, 1823, 1871, 2063, 2111, 2183, 2231, 2279, 2302, 2350, 2423, 2471, 2519, 2542, 2590, 2663, 2711, 2759, 2782, 2830, 3023, 3071, 3263, 3311, 3503, 3551, 3623, 3671, 3719
Offset: 1

Views

Author

Amiram Eldar, Feb 24 2022

Keywords

Examples

			71 is a term since the factorial-base representations of 71 and 73 are 2321 and 3001, respectively, and both have 2 odd digits and 2 even digits.
		

Crossrefs

Subsequence of A351895.
Similar sequence: A337238.

Programs

  • Mathematica
    max = 7; fctBaseDigits[n_] := IntegerDigits[n, MixedRadix[Range[max, 2, -1]]]; s = Select[Range[1, max!], EvenQ[Length[(d = fctBaseDigits[#])]] && Count[d, _?EvenQ] == Length[d]/2 &]; ind = Position[Differences[s], 2] // Flatten; s[[ind]]
Showing 1-4 of 4 results.