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 11-20 of 21 results. Next

A135550 Number of bases b, 1 < b < n-1, in which n is a palindrome, allowing leading zeros when testing if a number is a palindrome.

Original entry on oeis.org

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

Views

Author

John P. Linderman, Feb 26 2008, Feb 28 2008

Keywords

Comments

Every integer n is a palindrome when expressed in unary, or in base n-1 (where it will be 11). So here we assume 1 < b < n-1.
Here 4 = 100 counts as a palindrome in base 2, since 00100 is palindromic.

Crossrefs

A087155 Primes having nontrivial palindromic representation in some (at least one) base.

Original entry on oeis.org

5, 7, 13, 17, 23, 29, 31, 37, 41, 43, 59, 61, 67, 71, 73, 83, 89, 97, 101, 107, 109, 113, 127, 131, 151, 157, 173, 181, 191, 193, 197, 199, 211, 227, 229, 233, 239, 241, 251, 257, 271, 277, 281, 307, 313, 331, 337, 349, 353, 373, 379, 383, 397, 401, 409, 419
Offset: 1

Views

Author

Randy L. Ekl, Oct 18 2003

Keywords

Comments

Number of terms < 10^n: 2, 18, 129, 1010, 8392, ..., . - Robert G. Wilson v, Jun 19 2014
Every whole number has single-digit representation in all large bases and all greater than 2 have representation 11 in the base one less than itself. Other palindromic representations are the nontrivial ones. - James G. Merickel, Jul 25 2015
Primes not in A016038. - Robert Israel, Jul 27 2015

Examples

			17 is in the list because 17_2 = 10001 and 17_4 = 101, two nontrivial palindromic representations. 19 is not in the list because 19 is not a multidigit palindrome in any base other than base 18.
		

Crossrefs

Cf. A016038.

Programs

  • Maple
    filter:= proc(n) local b,L;
    if not isprime(n) then return false fi;
    for b from 2 to floor(sqrt(n)) do
      L:= convert(n,base,b);
      if L = ListTools:-Reverse(L) then return true fi;
    od:
    false
    end proc:
    select(filter, [2*i+1 $ i=1..1000]); # Robert Israel, Jul 27 2015
  • Mathematica
    palindromicBases[n_] := Module[{p}, Table[p = IntegerDigits[n, b]; If[p == Reverse[p], {b, p}, Sequence @@ {}], {b, 2, n - 2}]]; Select[ Prime@ Range@ 300, palindromicBases[#] !={}&] (* Robert G. Wilson v, May 06 2014 *)
  • PARI
    q=1; forprime(m=3,500,count=0; for(b=2,m-1, w=b+1; k=0; i=m; while(i>0,k=k*w+i%b; i=floor(i/b)); l=0; j=k; while(j>0,l=l*w+j%w; j=floor(j/w)); if(l==k,count=count+1; if(count>1,print1(m,", "); q=b; m=nextprime(m+1); q=1; b=1,q=b),)))

Extensions

Title, comments and example changed to agree with convention on single-digit numbers and incorporate 'nontrivial' concept by James G. Merickel, Jul 25 2015

A138329 List of strictly non-palindromic twin primes {p, p+2}.

Original entry on oeis.org

137, 139, 4337, 4339, 8291, 8293, 9419, 9421, 10937, 10939, 13757, 13759, 19427, 19429, 20981, 20983, 36011, 36013, 38327, 38329, 43397, 43399, 59441, 59443, 71327, 71329, 74717, 74719, 76871, 76873, 90437, 90439, 91571, 91573, 117239
Offset: 1

Views

Author

Karl Hovekamp, Mar 14 2008

Keywords

Comments

The strictly non-palindromic twin primes are a part of the normal twin primes. See the list of twin primes A077800 and A016038 for the strictly non-palindromic numbers.

References

  • Karl Hovekamp, Palindromzahlen in adischen Zahlensystemen, 2004

Crossrefs

Formula

Twin primes, where both numbers {p} and {p+2} are strictly non-palindromic.

A138348 Lesser of twin primes such that both twin primes have no bases b, 1 < b < p-1, in which p is a palindrome.

Original entry on oeis.org

137, 4337, 8291, 9419, 10937, 13757, 19427, 20981, 36011, 38327, 43397, 59441, 71327, 74717, 76871, 90437, 91571, 117239, 120941, 121019, 167021, 181787, 191561, 196871, 197597, 221717, 228881, 239387, 240881, 271277, 279119, 289031
Offset: 1

Views

Author

Robert G. Wilson v, Mar 09 2008

Keywords

Comments

Also primes in A016038 which are 2 less than their immediate successors.
Prime index of A138348: {33, 592, 1040, 1165, 1328, 1627, 2201, 2359, 3826, 4046, 4524, 6009, 7060, 7367, 7557, 8756, 8852, ...

Crossrefs

Programs

  • Mathematica
    palindromicBases[n_] := Module[{p}, Table[p = IntegerDigits[n, b]; If[p == Reverse[p], {b, p}, Sequence @@ {}], {b, 2, n - 2}]]; lst = {}; Do[ If[ Length@ palindromicBases@ Prime@ n == 0, AppendTo[lst, Prime@n]], {n, 22189}]; lst[[ # ]] & /@ Select[ Range@ Length@ lst - 1, lst[[ # ]] + 2 == lst[[ # + 1]] &]
    f[n_] := Block[{k = 2}, While[id = IntegerDigits[n, k]; id != Reverse@ id, k++ ]; k]; lst = {2}; Do[p = Prime@ n; If[ f@p == p - 1, AppendTo[lst, p]; Print@p], {n, 128149}]; lst[[ # ]] & /@ Select[Range@11284, lst[[ # ]] + 2 == lst[[ # + 1]] &]
    nbQ[n_]:=NoneTrue[Table[IntegerDigits[n,b],{b,2,n-2}],#==Reverse[#]&] && NoneTrue[ Table[IntegerDigits[n+2,b],{b,2,n}],#==Reverse[#]&]; Select[ Select[Partition[Prime[Range[26000]],2,1],#[[2]]-#[[1]]==2&][[All,1]],nbQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 03 2021 *)

A138358 List of triples of strictly non-palindromic primes without an ordinary prime in between.

Original entry on oeis.org

137, 139, 149, 1433, 1439, 1447, 4337, 4339, 4349, 5297, 5303, 5309, 8287, 8291, 8293, 13049, 13063, 13093, 30293, 30307, 30313, 36007, 36011, 36013, 43391, 43397, 43399
Offset: 1

Views

Author

Karl Hovekamp, Mar 16 2008

Keywords

Comments

Up to 10^9 there are 2992 triples of strictly non-palindromic primes if the quadruples and quintuples are not counted.
For quadruples of this kind, see A138359.
For quintuples of this kind, see A138360.

Examples

			Primes:
...
113 is palindromic in base 8
127 is palindromic in base 2 and base 9
131 is palindromic in base 10
137 is strictly non-palindromic
139 is strictly non-palindromic
149 is strictly non-palindromic
151 is palindromic in base 3 and base 10
157 is palindromic in base 7 and base 12
...
So {137, 139, 149} is the first triple of strictly non-palindromic primes.
		

References

  • Karl Hovekamp, Palindromzahlen in adischen Zahlensystemen, 2004

Crossrefs

Formula

A small fraction of the primes are strictly non-palindromic. Notice that all strictly non-palindromic numbers >6 are prime! (see: A016038) Triples of these strictly non-palindromic primes, without any normal prime in between, are listed here.

A138359 List of quadruples of strictly non-palindromic primes without an ordinary prime in between them.

Original entry on oeis.org

44449, 44453, 44483, 44491, 120811, 120817, 120823, 120829, 315037, 315047, 315059, 315067, 583069, 583087, 583127, 583139, 617411, 617429, 617447, 617453, 1553423, 1553429, 1553437, 1553467, 1712329, 1712339, 1712353, 1712369
Offset: 1

Views

Author

Karl Hovekamp, Mar 16 2008

Keywords

Comments

For triples of this kind, see A138358.
For quintuples of this kind, see A138360.

Examples

			Primes:
...
44417 palindromic in bases 50, 106, 135 and 141
44449 strictly non-palindromic
44453 strictly non-palindromic
44483 strictly non-palindromic
44491 strictly non-palindromic
44497 palindromic in base 67 and base 206
...
So {44449, 44453, 44483, 44491} is the first quadruple of strictly non-palindromic primes.
		

References

  • Karl Hovekamp, Palindromzahlen in adischen Zahlensystemen, 2004

Crossrefs

A138360 Quintuples of 5 consecutive strictly non-palindromic primes.

Original entry on oeis.org

3253177, 3253219, 3253223, 3253231, 3253241, 20189111, 20189119, 20189123, 20189137, 20189167, 22122937, 22122979, 22122983, 22123021, 22123043, 61309069, 61309081, 61309091, 61309093, 61309097, 89073521, 89073533, 89073583, 89073599, 89073613
Offset: 1

Views

Author

Karl Hovekamp, Mar 16 2008

Keywords

Comments

The quintuples T(n,1), T(n,2), .. T(n,5), n>=1, in this array are 5 consecutive primes (consecutive in A000040) which are also members of A016038.
Notice that all strictly non-palindromic numbers >6 are prime! (See A016038.) Quintuples of these strictly non-palindromic primes, without any normal prime in between, are listed here.
Up to 1 billion there are only 5 quintuples of strictly non-palindromic primes. May be that there are no more quintuples of this kind. Up to 1 billion there are no n-tuples of strictly non-palindromic primes with n>5.

Examples

			Primes:
...
3253153 palindromic in bases 203, 356, 495, 1316, 1442, 1504 and 1648
3253177 strictly non-palindromic
3253219 strictly non-palindromic
3253223 strictly non-palindromic
3253231 strictly non-palindromic
3253241 strictly non-palindromic
3253253 palindromic in bases 653, 768, 910 and 1001
...
So {3253177, 3253219, 3253223, 3253231, 3253241} is the first quintuple of the strictly non-palindromic primes.
		

References

  • Karl Hovekamp, Palindromzahlen in adischen Zahlensystemen, 2004

Crossrefs

Cf. A138358 (triples), A138359 (4-tuples), A138329, A016038, A047811, A016038.

Extensions

More terms from Mauro Fiorentini, Jan 03 2016

A375201 a(n) is the sum of the bases b with 1 < b < n-1 in which n is a palindrome.

Original entry on oeis.org

0, 2, 0, 2, 3, 2, 7, 0, 5, 3, 6, 6, 10, 6, 13, 0, 12, 12, 10, 3, 23, 4, 20, 10, 22, 4, 23, 7, 22, 12, 20, 6, 41, 6, 22, 12, 38, 5, 37, 6, 31, 24, 31, 0, 56, 6, 40, 22, 45, 0, 51, 20, 43, 30, 28, 4, 82, 6, 35, 34, 53, 26, 63, 11, 52, 22, 56, 7, 91, 10, 42, 38, 55, 10, 87, 0, 91, 34, 52, 5, 112, 29
Offset: 4

Views

Author

Robert Israel, Oct 15 2024

Keywords

Comments

If n = s*t is composite with s <= t-2, then n = s * (t-1) + s is a two-digit palindrome in base t-1, while s^2 = (s-1)^2 + 2 * (s-1) + 1 is a palindrome in base s-1. Thus a(n) >= sqrt(n)-1 for composite n > 6. On the other hand, there may be infinitely many primes for which a(n) = 0 (see A016038).

Examples

			a(10) = 7 because 10 = 101_3 = 22_4 is a palindrome in bases 3 and 4, and 3 + 4 = 7.
		

Crossrefs

Programs

  • Maple
    ispali:= proc(x, b) local F; F:= convert(x, base, b);
      andmap(t -> F[t] = F[-t], [$1.. nops(F)/2])
    end proc:
    f:= proc(k) convert(select(b -> ispali(k, b), [$2..k-2]), `+`) end proc:
    map(f, [$4 .. 100]);
  • Python
    from sympy.ntheory import is_palindromic
    def a(n): return sum(b for b in range(2, n-2) if is_palindromic(n, b))
    print([a(n) for n in range(4, 86)]) # Michael S. Branicky, Oct 15 2024

A344512 a(n) is the least number larger than 1 which is a self number in all the bases 2 <= b <= n.

Original entry on oeis.org

4, 13, 13, 13, 287, 287, 2971, 2971, 27163, 27163, 90163, 90163, 5940609, 5940609, 6069129, 6069129, 276404649, 276404649
Offset: 2

Views

Author

Amiram Eldar, May 21 2021

Keywords

Comments

Since the sequence of base-b self numbers for odd b is the sequence of the odd numbers (A005408) (Joshi, 1973), all the terms beyond a(2) are odd numbers.
For the corresponding sequence with only even bases, see A344513.
a(20) > 1.5*10^10, if it exists.

Examples

			a(2) = 4 since the least binary self number after 1 is A010061(2) = 4.
a(3) = 13 since the least binary self number after 1 which is also a self number in base 3 is A010061(4) = 13.
		

References

  • Vijayshankar Shivshankar Joshi, Contributions to the theory of power-free integers and self-numbers, Ph.D. dissertation, Gujarat University, Ahmedabad (India), October, 1973.
  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, p. 384-386.

Crossrefs

Programs

  • Mathematica
    s[n_, b_] := n + Plus @@ IntegerDigits[n, b]; selfQ[n_, b_] := AllTrue[Range[n, n - (b - 1) * Ceiling @ Log[b, n], -1], s[#, b] != n &]; a[2] = 4; a[b_] := a[b] = Module[{n = a[b - 1]}, While[! AllTrue[Range[2, b], selfQ[n, #] &], n++]; n]; Array[a, 10, 2]

Formula

a(2*n+1) = a(2*n) for n >= 2.

A344513 a(n) is the least number larger than 1 which is a self number in all the even bases b = 2*k for 1 <= k <= n.

Original entry on oeis.org

4, 13, 287, 294, 6564, 90163, 1136828, 3301262, 276404649, 5643189146
Offset: 1

Views

Author

Amiram Eldar, May 21 2021

Keywords

Comments

Joshi (1973) proved that for all odd b the sequence of base-b self numbers is the sequence of odd numbers (A005408). Therefore, in this sequence the bases are restricted to even values. For the corresponding sequence with both odd and even bases, see A344512.

Examples

			a(1) = 4 since the least binary self number after 1 is A010061(2) = 4.
a(2) = 13 since the least binary self number after 1 which is also a self number in base 2*2 = 4 is A010061(4) = A010064(4) = 13.
		

References

  • Vijayshankar Shivshankar Joshi, Contributions to the theory of power-free integers and self-numbers, Ph.D. dissertation, Gujarat University, Ahmedabad (India), October, 1973.
  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, p. 384-386.

Crossrefs

Programs

  • Mathematica
    s[n_, b_] := n + Plus @@ IntegerDigits[n, b]; selfQ[n_, b_] := AllTrue[Range[n, n - (b - 1) * Ceiling @ Log[b, n], -1], s[#, b] != n &]; a[1] = 4; a[n_] := a[n] = Module[{k = a[n - 1]}, While[! AllTrue[Range[1, n], selfQ[k, 2*#] &], k++]; k]; Array[a, 7]
Previous Showing 11-20 of 21 results. Next